A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.tutorialspoint.com/cpp_standard_library/cpp_string_crbegin.htm below:

C++ crbegin() Function

C++ String Library - crbegin Description

It return const_reverse_iterator to reverse beginning.

Declaration

Following is the declaration for std::string::crbegin.

const_reverse_iterator crbegin() const noexcept;
C++11
const_reverse_iterator crbegin() const noexcept;
Parameters

none

Return Value

It returns a const_reverse_iterator to the reverse beginning of the string.

Exceptions

Never throw any exceptions.

Example

In below example for std::string::crbegin.

#include <iostream>
#include <string>

int main () {
   std::string str ("Tutorials Point");
   for (auto rit=str.crbegin(); rit!=str.crend(); ++rit)
      std::cout << *rit;
   std::cout << '\n';

   return 0;
}

The sample output should be like this −

tnioP slairotuT

string.htm


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4