FindOneOf
Search this string for the first character that matches any character contained in lpszCharSet.
int FindOneOf( LPCSTR lpszCharSet )
The zero-based index of the first character in this string that is also in lpszCharSet. -1 if there is no match.
EX1
void string_FindOneOf_ex1() { string str("abcdef"); int nRet = str.FindOneOf("cd"); //return the first matching index out_int("", nRet); // 2 nRet = str.FindOneOf("xd"); out_int("", nRet); // 3 nRet = str.FindOneOf("gh"); out_int("", nRet); // -1 }
string::Find
origin.h