NXC  Version 1.2.1 r5
 All Data Structures Files Functions Variables Groups Pages
int Pos ( string  Substr,
string  S 
)
inline

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
SubstrA substring to search for in another string.
SA 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.