IndexOfString
The IndexOfString function returns the zero-based index of the first occurrence of the search string in the input string. If the Search string is not found, the function returns -1.
Syntax
Copy Code | |
---|---|
int IndexOfString( string targetString, string searchString, bool ignoreCase ); |
Parameters
Return Values
Returns a zero-based index of the first occurrence of the search string in the input string. If the search string is not found, returns -1. Also, it returns -1 if either targetString or searchString is empty, null or the length of the target string is less than that of the search string.