Tries to find a sub-string within another string, and returns the zero-based index of the first character of the sub-string in string. If the sub-string is not found, -1 is returned.
|string||yes||String to be searched.|
|string||yes||Sub-string to be searched for with "string" argument.|
|integer||yes||Zero-based index of the character of string to start searching at, or 0 to search from the beginning.|
Returns the zero based index of the location of the first character of the sub-string found. Returns -1 if not found.
// Search for a substring
string $str = "This is some text";
// Search for the word "some"
$index = `strFind $str "some" 0`;
// Should be 8
// Search for the word "texas"
$index = `strFind $str "texas" 0`;
// Should be -1
// Search for the letter "t" after the word "some"
$index = `strFind $str "t" 12`;
// Should be 13