std::basic_string<CharT,Traits,Allocator>::end,std::basic_string<CharT,Traits,Allocator>::cend (3) - Linux Manuals
std::basic_string<CharT,Traits,Allocator>::end,std::basic_string<CharT,Traits,Allocator>::cend: std::basic_string<CharT,Traits,Allocator>::end,std::basic_string<CharT,Traits,Allocator>::cend
Command to display std::basic_string<CharT,Traits,Allocator>::end,std::basic_string<CharT,Traits,Allocator>::cend
manual in Linux: $ man 3 std::basic_string<CharT,Traits,Allocator>::end,std::basic_string<CharT,Traits,Allocator>::cend
NAME
std::basic_string<CharT,Traits,Allocator>::end,std::basic_string<CharT,Traits,Allocator>::cend - std::basic_string<CharT,Traits,Allocator>::end,std::basic_string<CharT,Traits,Allocator>::cend
Synopsis
iterator end(); (until C++11)
iterator end() noexcept; (since C++11)
const_iterator end() const; (1) (until C++11)
const_iterator end() const noexcept; (2) (since C++11)
const_iterator cend() const noexcept; (3) (since C++11)
Returns an iterator to the character following the last character of the string. This character acts as a placeholder, attempting to access it results in undefined behavior.
range-begin-end.svg
Parameters
(none)
Return value
iterator to the character following the last character
Complexity
Constant
Example
// Run this code
#include <iostream>
#include <algorithm>
#include <iterator>
#include <string>
int main()
{
std::string s("Exemparl");
std::next_permutation(s.begin(), s.end());
std::string c;
std::copy(s.cbegin(), s.cend(), std::back_inserter(c));
std::cout << c <<'\n'; // "Exemplar"
}
Output:
Exemplar
See also
begin
cbegin returns an iterator to the beginning
(public member function)
(C++11)
Pages related to std::basic_string<CharT,Traits,Allocator>::end,std::basic_string<CharT,Traits,Allocator>::cend
- std::basic_string<CharT,Traits,Allocator>::end, (3) - std::basic_string<CharT,Traits,Allocator>::end,
- std::basic_string<CharT,Traits,Allocator>::ends_with (3) - std::basic_string<CharT,Traits,Allocator>::ends_with
- std::basic_string<CharT,Traits,Allocator>::empty (3) - std::basic_string<CharT,Traits,Allocator>::empty
- std::basic_string<CharT,Traits,Allocator>::erase (3) - std::basic_string<CharT,Traits,Allocator>::erase
- std::basic_string<CharT,Traits,Allocator>::append (3) - std::basic_string<CharT,Traits,Allocator>::append
- std::basic_string<CharT,Traits,Allocator>::assign (3) - std::basic_string<CharT,Traits,Allocator>::assign
- std::basic_string<CharT,Traits,Allocator>::at (3) - std::basic_string<CharT,Traits,Allocator>::at
- std::basic_string<CharT,Traits,Allocator>::back (3) - std::basic_string<CharT,Traits,Allocator>::back
- std::basic_string<CharT,Traits,Allocator>::basic_string (3) - std::basic_string<CharT,Traits,Allocator>::basic_string
- std::basic_string<CharT,Traits,Allocator>::begin, (3) - std::basic_string<CharT,Traits,Allocator>::begin,
- std::basic_string<CharT,Traits,Allocator>::begin,std::basic_string<CharT,Traits,Allocator>::cbegin (3) - std::basic_string<CharT,Traits,Allocator>::begin,std::basic_string<CharT,Traits,Allocator>::cbegin
- std::basic_string<CharT,Traits,Allocator>::c_str (3) - std::basic_string<CharT,Traits,Allocator>::c_str
- std::basic_string<CharT,Traits,Allocator>::capacity (3) - std::basic_string<CharT,Traits,Allocator>::capacity
- std::basic_string<CharT,Traits,Allocator>::clear (3) - std::basic_string<CharT,Traits,Allocator>::clear
- std::basic_string<CharT,Traits,Allocator>::compare (3) - std::basic_string<CharT,Traits,Allocator>::compare
- std::basic_string<CharT,Traits,Allocator>::copy (3) - std::basic_string<CharT,Traits,Allocator>::copy
- std::basic_string<CharT,Traits,Allocator>::data (3) - std::basic_string<CharT,Traits,Allocator>::data
- std::basic_string<CharT,Traits,Allocator>::find (3) - std::basic_string<CharT,Traits,Allocator>::find
- std::basic_string<CharT,Traits,Allocator>::find_first_not_of (3) - std::basic_string<CharT,Traits,Allocator>::find_first_not_of
- std::basic_string<CharT,Traits,Allocator>::find_first_of (3) - std::basic_string<CharT,Traits,Allocator>::find_first_of
- std::basic_string<CharT,Traits,Allocator>::find_last_not_of (3) - std::basic_string<CharT,Traits,Allocator>::find_last_not_of
- std::basic_string<CharT,Traits,Allocator>::find_last_of (3) - std::basic_string<CharT,Traits,Allocator>::find_last_of
- std::basic_string<CharT,Traits,Allocator>::front (3) - std::basic_string<CharT,Traits,Allocator>::front
- std::basic_string<CharT,Traits,Allocator>::get_allocator (3) - std::basic_string<CharT,Traits,Allocator>::get_allocator
- std::basic_string<CharT,Traits,Allocator>::insert (3) - std::basic_string<CharT,Traits,Allocator>::insert
- std::basic_string<CharT,Traits,Allocator>::max_size (3) - std::basic_string<CharT,Traits,Allocator>::max_size
- std::basic_string<CharT,Traits,Allocator>::npos (3) - std::basic_string<CharT,Traits,Allocator>::npos
- std::basic_string<CharT,Traits,Allocator>::operator+= (3) - std::basic_string<CharT,Traits,Allocator>::operator+=
- std::basic_string<CharT,Traits,Allocator>::operator= (3) - std::basic_string<CharT,Traits,Allocator>::operator=
- std::basic_string<CharT,Traits,Allocator>::operator[] (3) - std::basic_string<CharT,Traits,Allocator>::operator[]
- std::basic_string<CharT,Traits,Allocator>::operatorbasic_string_view (3) - std::basic_string<CharT,Traits,Allocator>::operatorbasic_string_view
- std::basic_string<CharT,Traits,Allocator>::pop_back (3) - std::basic_string<CharT,Traits,Allocator>::pop_back
- std::basic_string<CharT,Traits,Allocator>::push_back (3) - std::basic_string<CharT,Traits,Allocator>::push_back
- std::basic_string<CharT,Traits,Allocator>::rbegin, (3) - std::basic_string<CharT,Traits,Allocator>::rbegin,
- std::basic_string<CharT,Traits,Allocator>::rbegin,std::basic_string<CharT,Traits,Allocator>::crbegin (3) - std::basic_string<CharT,Traits,Allocator>::rbegin,std::basic_string<CharT,Traits,Allocator>::crbegin
- std::basic_string<CharT,Traits,Allocator>::rend, (3) - std::basic_string<CharT,Traits,Allocator>::rend,
- std::basic_string<CharT,Traits,Allocator>::rend,std::basic_string<CharT,Traits,Allocator>::crend (3) - std::basic_string<CharT,Traits,Allocator>::rend,std::basic_string<CharT,Traits,Allocator>::crend
- std::basic_string<CharT,Traits,Allocator>::replace (3) - std::basic_string<CharT,Traits,Allocator>::replace
- std::basic_string<CharT,Traits,Allocator>::reserve (3) - std::basic_string<CharT,Traits,Allocator>::reserve
- std::basic_string<CharT,Traits,Allocator>::resize (3) - std::basic_string<CharT,Traits,Allocator>::resize
- std::basic_string<CharT,Traits,Allocator>::rfind (3) - std::basic_string<CharT,Traits,Allocator>::rfind
- std::basic_string<CharT,Traits,Allocator>::shrink_to_fit (3) - std::basic_string<CharT,Traits,Allocator>::shrink_to_fit
- std::basic_string<CharT,Traits,Allocator>::size, (3) - std::basic_string<CharT,Traits,Allocator>::size,
- std::basic_string<CharT,Traits,Allocator>::size,std::basic_string<CharT,Traits,Allocator>::length (3) - std::basic_string<CharT,Traits,Allocator>::size,std::basic_string<CharT,Traits,Allocator>::length
- std::basic_string<CharT,Traits,Allocator>::starts_with (3) - std::basic_string<CharT,Traits,Allocator>::starts_with
- std::basic_string<CharT,Traits,Allocator>::substr (3) - std::basic_string<CharT,Traits,Allocator>::substr
- std::basic_string<CharT,Traits,Allocator>::swap (3) - std::basic_string<CharT,Traits,Allocator>::swap