Поделиться через


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

См. также

Основные понятия

CStringT Class

CStringT Members