24 Strings library [strings]

24.3 String classes [string.classes]

24.3.2 Class template basic_Β­string [basic.string]

24.3.2.7 basic_Β­string string operations [string.ops]

24.3.2.7.5 basic_Β­string​::​find_Β­last_Β­of [string.find.last.of]

size_type find_last_of(basic_string_view<charT, traits> sv, size_type pos = npos) const noexcept;

Effects: Determines the highest position xpos, if possible, such that both of the following conditions hold:

  • xpos <= pos and xpos < size();

  • traits​::​eq(at(xpos), sv.at(I)) for some element I of the data referenced by sv.

Returns: xpos if the function can determine such a value for xpos. Otherwise, returns npos.

size_type find_last_of(const basic_string& str, size_type pos = npos) const noexcept;

Effects: Equivalent to: return find_Β­last_Β­of(basic_Β­string_Β­view<charT, traits>(str), pos);

size_type find_last_of(const charT* s, size_type pos, size_type n) const;

Returns: find_Β­last_Β­of(basic_Β­string_Β­view<charT, traits>(s, n), pos).

size_type find_last_of(const charT* s, size_type pos = npos) const;

Requires: s points to an array of at least traits​::​length(s) + 1 elements of charT.

Returns: find_Β­last_Β­of(basic_Β­string_Β­view<charT, traits>(s), pos).

size_type find_last_of(charT c, size_type pos = npos) const;

Returns: find_Β­last_Β­of(basic_Β­string(1, c), pos).