string::rend

Return a reverse iterator to the character following the last character of the reversed container.

Synopsis

string::reverse_iterator
rend() noexcept; (1)

string::const_reverse_iterator
rend() const noexcept; (2)

Description

Returns the pointed-to character that corresponds to the character preceding the first character of the non-reversed container. This character acts as a placeholder, attempting to access it results in undefined behavior.

Complexity

Constant.

Exception Safety

No-throw guarantee.