find_first_of overloads

Synopses

Declared in <bslstl_string.h>

Find the first character belonging to the specified set.

size_type
find_first_of(
    CHAR_TYPE character,
    size_type position = 0) const;

Find the first character belonging to the specified set.

size_type
find_first_of(
    basic_string const& characterString,
    size_type position = 0) const noexcept;

Return the position of the first matching character.

size_type
find_first_of(
    CHAR_TYPE const* characterString,
    size_type position = 0) const;

Find the first character belonging to the specified set.

template<class STRING_VIEW_LIKE_TYPE>
size_type
find_first_of(
    STRING_VIEW_LIKE_TYPE const& characterString,
    size_type position = 0) const noexcept(true);

Return the position of the first matching character.

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

Return Value

  • position of the first matching character, or npos

  • the position of the first match, or npos

Parameters

Name

Description

character

character value

position

starting index

characterString

pointer to characters

numChars

the number of characters in characterString

Created with MrDocs