Export (0) Print
Expand All

CStringT::FindOneOf

Searches this string for the first character that matches any character contained in pszCharSet.

int FindOneOf(
   PCXSTR pszCharSet
) const throw();

Parameters

pszCharSet
String containing characters for matching.

Return Value

The zero-based index of the first character in this string that is also in pszCharSet; –1 if there is no match.

Remarks

Finds the first occurrence of any of the characters in pszCharSet.

Example

The following example demonstrates the use of CStringT::FindOneOf.

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

CAtlString s( "abcdef" );
_ASSERT( s.FindOneOf( "xd" ) == 3 ); // 'd' is first match

See Also

CStringT Overview | Class Members

Show:
© 2014 Microsoft