libstdc++
GNU C++ library
Loading...
Searching...
No Matches

◆ find_last_of() [2/8]

template<typename _CharT, typename _Traits, typename _Alloc>
size_type std::basic_string< _CharT, _Traits, _Alloc >::find_last_of ( _CharT __c,
size_type __pos = npos ) const
inlinenoexcept

Find last position of a character.

Parameters
__cCharacter to locate.
__posIndex of character to search back from (default end).
Returns
Index of last occurrence.

Starting from __pos, searches backward for __c within this string. If found, returns the index where it was found. If not found, returns npos.

Note: equivalent to rfind(__c, __pos).

Definition at line 2721 of file cow_string.h.

2722 { return this->rfind(__c, __pos); }
constexpr size_type rfind(const basic_string &__str, size_type __pos=npos) const noexcept
Find last position of a string.
Managing sequences of characters and character-like objects.