CStringT::FindOneOf

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

int FindOneOf(
   PCXSTR pszCharSet
) const throw( );

pszCharSet

String containing characters for matching.

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

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

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

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

Header: cstringt.h

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2015 Microsoft