Find substring position.
Returns the index value of the first character in a specified substring that occurs in a given string. Pos searches for Substr within S and returns an integer value that is the index of the first character of Substr within S. Pos is case-sensitive. If Substr is not found, Pos returns negative one.
- Parameters
-
Substr | A substring to search for in another string. |
S | A string that might contain the specified substring. |
- Returns
- The position of the substring in the specified string or -1 if it is not found.
- Examples:
- ex_Pos.nxc.