...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
Find the last occurrence of a character not equal to ch
.
std::size_t
find_last_not_of( char ch,std::size_t
pos =string::npos
) const noexcept;
Returns the index corrosponding to the last character of {begin(), begin() + pos}
that is not equal to ch
if it exists, and npos
otherwise.
Linear.
The last occurrence of a character that is not equal to ch
before or at the index pos
, or npos
if none exists.
Name |
Description |
---|---|
|
The character to ignore. |
|
The index to start searching at. The default argument for this
parameter is |