ReverseFind
Search this string object for the last match of a character.
int ReverseFind( char ch )
Returns the index of the last character in this string object that matches the requested character; -1 if the character is not found.
EX1
void string_ReverseFind_ex1() { string str1("abcabc"); int nRet = str1.ReverseFind('b'); out_int("", nRet);//4 nRet = str1.ReverseFind('g'); out_int("", nRet);//-1 }
EX2
void string_ReverseFind_ex2() { string str = Project.GetName(true); printf("current project is %s\n", str); string strExt = str.Mid(str.ReverseFind('.')+1); if(strExt.CompareNoCase("OPJ") != 0) out_str("The current project is not an OPJ file, it might be an ORG file"); }
string::Find, string::FindOneOf
origin.h