fb:porticula NoPaste
4PMedia
Uploader: | ytwinky |
Datum/Zeit: | 12.07.2007 19:14:14 |
Function Match(byVal Text As String, byVal Mask As String) As Integer
Dim As String TempText, PrevText, s
Dim As Integer DestRPL, DoneRPL
Dim i As UInteger
For i=1 To Len(Mask)
DestRPL += IIF(SubStr(Mask, "*", i)<>Chr(0) AND SubStr(Mask, "*", i)<>"", 1, 0)
Next
TempText = Text
For i=1 To Len(Mask)
PrevText = TempText
s = SubStr(Mask, "*", i)
TempText = Replace(TempText, s, String(Len(s), "X"))
DoneRPL += IIF(PrevText <> TempText, 1, 0)
Next
Return IIF(DestRPL-DoneRPL = 0, 1, 0)
End Function