This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.
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.
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.