bsl::basic_string<char32_t>::find_first_of

find_first_of overloads

Synopses

Declared in <bslstl_string.h>

Return the position of the first occurrence of the specified character, 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.

size_type
find_first_of(
    char32_t character,
    size_type position = 0) const;
» more...

Return the position of the first occurrence of a character belonging to the specified characterString, 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.

size_type
find_first_of(
    basic_string<char32_t> const& characterString,
    size_type position = 0) const noexcept;
» more...

Same as the preceding find_first_of overload, searching from the start of the string.

size_type
find_first_of(
    char32_t const* characterString,
    size_type position = 0) const;
» more...

Return the position of the first occurrence of a character belonging to the specified characterString, 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. The behavior is undefined unless the conversion from STRING_VIEW_LIKE_TYPE to bsl::basic_string_view<CHAR_TYPE, CHAR_TRAITS> does not throw any exception. Note that this behavior differs from the behavior implemented in the standard container, where the following noexcept specification is used: ` noexcept( std::is_nothrow_convertible_v<const T&, std::basic_string_view<CharT, Traits> >) `

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

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.

size_type
find_first_of(
    char32_t const* characterString,
    size_type position,
    size_type numChars) const;
» more...