bsl::basic_string::find_first_of

Return the position of the first matching character.

Synopsis

Declared in <bslstl_string.h>

size_type
find_first_of(
    CHAR_TYPE const* characterString,
    size_type position,
    size_type numChars) const;

Description

Return the position of the first occurrence of a character belonging to the specified characterString of the optionally specified numChars length, if such an occurrence can be found in this string (on or after the optionally specified position if such a position is specified), and return npos otherwise. If numChars is not specified, CHAR_TRAITS::length(characterString) is used.

Return Value

the position of the first match, or npos

Parameters

NameDescription
characterStringthe character set to search for
positionthe starting search position
numCharsthe number of characters in characterString