bsl::basic_string::rfind

rfind overloads

Synopses

Declared in <bslstl_string.h>

Find the last occurrence of a sequence in this string.

size_type
rfind(
    CHAR_TYPE character,
    size_type position = npos) const;
» more...

Return the last occurrence of the specified substring in this string.

size_type
rfind(
    basic_string const& substring,
    size_type position = npos) const noexcept;
» more...

Same as the three-argument rfind overload with default position.

size_type
rfind(
    CHAR_TYPE const* characterString,
    size_type position = npos) const;
» more...

Find the last occurrence of a sequence in this string.

template<class STRING_VIEW_LIKE_TYPE>
size_type
rfind(
    STRING_VIEW_LIKE_TYPE const& substring,
    size_type position = npos) const noexcept(true);
» more...

Find the last occurrence of a sequence in this string.

size_type
rfind(
    CHAR_TYPE const* characterString,
    size_type position,
    size_type numChars) const;
» more...

Return Value

position of the match, or npos if not found

Parameters

NameDescription
charactercharacter value
positionstarting index
substringsubstring to search for
characterStringpointer to characters
numCharsnumber of characters