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_cend.htm below:

C++ String cend Function

C++ String Library - cend Description

It returns a const_iterator pointing to the past-the-end character of the string.

Declaration

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

const_iterator cend() const noexcept;
C++11
const_iterator cend() const noexcept;
Parameters

none

Return Value

It returns a const_iterator to the past-the-end of the string.

Exceptions

Never throw any exceptions.

Example

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

#include <iostream>
#include <string>

int main () {
   std::string str ("tutorialspoint india PVT Ltd");
   for (auto it=str.cbegin(); it!=str.cend(); ++it)
      std::cout << *it;
   std::cout << '\n';

   return 0;
}

The sample output should be like this −

tutorialspoint india PVT Ltd

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