Returns the zero-based index of the first occurrence of the specified sub string within the text. The search is done case-sensitive. Returns -1 if the sought string isn't found.
int IndexOf(string text; string subString)
text |
The string to search inside. |
subString |
The sub string to search for. |
Example
IndexOf("Lorem ipsum";"ipsum")
Returns 6.