CStringT::ReverseFind
Searches this CStringT object for the last match of a character.
int ReverseFind(
XCHAR ch
) const throw();
Parameters
- ch
The character to search for.
Return Value
The zero-based index of the last character in this CStringT object that matches the requested character, or –1 if the character is not found.
Remarks
The function is similar to the run-time function strrchr.
Example
// typedef CStringT<TCHAR, StrTraitATL<TCHAR, ChTraitsCRT<TCHAR>>> CAtlString;
CAtlString s(_T("abcabc"));
ASSERT(s.ReverseFind(_T('b')) == 4);
Requirements
Header: cstringt.h