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

C++ String end() Function

C++ String Library - end Description

It returns an iterator pointing to the first character of the string.

Declaration

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

   iterator end();
const_iterator end() const;
C++11
   iterator end() noexcept;
const_iterator end() const noexcept;
Parameters

none

Return Value

It returns an iterator to the past-the-end of the string.

Exceptions

Never throw any exceptions.

Example

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

#include <iostream>
#include <string>

int main () {
   std::string str ("Tutorials Point");
   for ( std::string::iterator it=str.begin(); it!=str.end(); ++it)
      std::cout << *it;
   std::cout << '\n';

   return 0;
}

The sample output should be like this −

Tutorials point  

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