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

◆ rfind() [2/8]

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

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.