std::basic_string<CharT,Traits,Allocator>::rend, (3) - Linux Manuals
std::basic_string<CharT,Traits,Allocator>::rend,: std::basic_string<CharT,Traits,Allocator>::rend,
NAME
std::basic_string<CharT,Traits,Allocator>::rend, - std::basic_string<CharT,Traits,Allocator>::rend,
Synopsis
reverse_iterator rend();
reverse_iterator rend()
const_reverse_iterator rend()
const_reverse_iterator rend()
const_reverse_iterator crend()
Returns a reverse iterator to the character following the last character of the
reversed string. It corresponds to the character preceding the first character of
the non-reversed string. This character acts as a placeholder, attempting to access
it results in undefined behavior.
range-rbegin-rend.svg
Parameters
(none)
Return value
reverse iterator to the character following the last character
Complexity
Constant
Example
// Run this code
std::string s("A man, a plan, a canal: Panama");
{
}
{
}
Output:
See also
rbegin
crbegin
(C++11)