fixstr::basic_fixed_string::rend
fixstr::basic_fixed_string::crend
#1 |
| |
#2 |
| |
#3 |
|
Returns a reverse iterator to the character following the last character of the reversed fixed string. It corresponds to the character preceding the first character of the non-reversed fixed string. This character acts as a placeholder, attempting to access it results in undefined behavior.
#
Parameters(none)
#
Return valueIterator to the character following the last character.
#
ComplexityConstant.
#
Example#include <algorithm>#include <fixed_string.hpp>#include <iostream>#include <iterator>#include <string>
int main(){ fixstr::fixed_string s = "A man, a plan, a canal: Panama"; { std::string c; std::copy(s.rbegin(), s.rend(), std::back_inserter(c)); std::cout << c << '\n'; // "amanaP :lanac a ,nalp a ,nam A" }
{ std::string c; std::copy(s.crbegin(), s.crend(), std::back_inserter(c)); std::cout << c << '\n'; // "amanaP :lanac a ,nalp a ,nam A" }}
amanaP :lanac a ,nalp a ,nam AamanaP :lanac a ,nalp a ,nam A