BloombergLP::bdlb::StringViewUtil::findLastNotOf

Return the position of the last character not in characters.

Synopsis

Declared in <bdlb_stringviewutil.h>

static
size_type
findLastNotOf(
    std::string_view const& string,
    std::string_view const& characters,
    size_type position = k_NPOS);

Description

Return the position of the last occurrence of a character not belonging to the specified characters, if such an occurrence can be found in the specified string (on or before the optionally specified position if such a position is specified), and return k_NPOS otherwise.

Return Value

position of the last non-match, or k_NPOS

Parameters

NameDescription
stringstring view to search
charactersset of characters to exclude
positionending index for the search (default k_NPOS)