CString::FindOneOf

This method searches this string for the first character that matches any character contained in lpszCharSet.

int FindOneOf(
LPCTSTR lpszCharSet )
const; 

Parameters

  • lpszCharSet
    Specifies the string containing characters for matching.

Return Value

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

Example

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

// example for CString::FindOneOf
CString s( "abcdef" );
ASSERT( s.FindOneOf( _T( "xd" ) ) == 3 ); // 'd' is first match

Requirements

  Windows CE versions: 1.0 and later
  Header file: Declared in Afx.h
  Platform: H/PC Pro, Palm-size PC, Pocket PC

See Also

CString::Find