FindWildcard

Top  Previous  Next

function FindWildcard(sSource, sFindWildcard, ByRef iStartPos, ByRef iLength) As Boolean

 

Searches in sSource for the first occurrence of sFindWildcard. sFindWildcard is a Wildcard expression with a start text, an asterisk and an end text with the syntax:

 

StartText*EndText

 

FindWildcard is case-sensitive. The first character in sSource has the position 1. If sFindWildcard is found, FindWildcard returns TRUE.

 

Parameters

 

sSource ... String expression sought.
sFindWildcard ... Wildcard expression being searched (StartText*EndText).
iStartPos ... Index of first occurrence.
iLength ... Length of found String.

 

Example:

Dim s, iStart, iLen

 

= "a number or a text"

If FindWildcard(s, "or*xt", iStart, iLen) then

   ' returns iStart = 10, iLen = 9

End If




Translate document: