Namespaces
Variants
Views
Actions

Difference between revisions of "cpp/string/basic string/rend"

From cppreference.com
< cpp‎ | string‎ | basic string
m (Use since= and until= params of {{dcl}} template.)
(reverse iterator functions return reverse_iterator types)
Line 3: Line 3:
 
{{dcl begin}}
 
{{dcl begin}}
 
{{dcl |  
 
{{dcl |  
iterator rend();
+
reverse_iterator rend();
 
}}
 
}}
 
{{dcl |
 
{{dcl |
const_iterator rend() const;
+
const_reverse_iterator rend() const;
 
}}
 
}}
 
{{dcl | since=c++11 |
 
{{dcl | since=c++11 |
const_iterator crend() const;
+
const_reverse_iterator crend() const;
 
}}
 
}}
 
{{dcl end}}
 
{{dcl end}}

Revision as of 15:15, 14 March 2014

 
 
 
std::basic_string
Member functions
Element access
Iterators
basic_string::rendbasic_string::crend
(C++11)
Capacity
Modifiers
Search
Operations
Constants
Non-member functions
I/O
Comparison
(until C++20)(until C++20)(until C++20)(until C++20)(until C++20)(C++20)
Numeric conversions
(C++11)(C++11)(C++11)
(C++11)(C++11)
(C++11)(C++11)(C++11)
(C++11)
(C++11)
Literals
Helper classes
Deduction guides (C++17)

 
reverse_iterator rend();
const_reverse_iterator rend() const;
const_reverse_iterator crend() const;
(since C++11)

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.

Contents

Parameters

(none)

Return value

reverse iterator to the character following the last character

Complexity

Constant

See also

returns a reverse iterator to the beginning
(public member function) [edit]