FindString

Top  Previous  Next

function FindString(sSource, sFindStr, ByRef iStartPos, ByRef iLength) As Boolean

 

Searches in sSource for the first occurrence of sFindStr.

 

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

 

Parameters

 

sSource ... String expression sought.
sFindStr ... String expression being searched.
iStartPos ... Index of first occurrence.
iLength ... Length of found String.

 

Example:

Dim s, iStart, iLen

 

= "a number or a text"

If FindString(s, "or", iStart, iLen) then

   ' returns iStart = 10, iLen = 2

End If




Translate document: