StringFind - method of the Pm object
Description:
Returns the position of the first character of searched text in the string
Syntax:
Long StringFind(String sValue, String sSearch, Long nStart)
Parameters:
sValue | (String) Source string expression. |
sSearch | (String) Searched string |
nStart | (Long) The position of character in searched string efining the start of the search |
---|
Return values:
-1 - the string was not found
n - the position number of found string (zero-based index)
Example:
JavaScriptVBScriptSelect and copy to clipboard
var sVal = "PROMOTIC is fun!";
var nRes = Pm.StringFind(sVal, "is", 0);
// nRes contains 9
Dim sVal
sVal = "PROMOTIC is fun!"
Dim nRes
nRes = Pm.StringFind(sVal, "is", 0)
' nRes contains 9