Export (0) Print
Expand All

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.

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.

The function is similar to the run-time function strrchr.

//typedef CStringT< TCHAR, StrTraitATL< TCHAR > > CAtlString;

CAtlString s( "abcabc" );
_ASSERT( s.ReverseFind( 'b' ) == 4 );

Community Additions

ADD
Show:
© 2015 Microsoft