Standard C++ Library Class Reference
Iterators
iterator begin ();
const_iterator begin () const;
Return an iterator initialized to the first element of the string.
iterator end ();
const_iterator end () const;
Return an iterator initialized to the position after the last element of the string.
reverse_iterator rbegin ();
const_reverse_iterator rbegin () const;
Returns an iterator equivalent to reverse_iterator(end()).
reverse_iterator rend ();
const_reverse_iterator rend () const;
Returns an iterator equivalent to reverse_iterator(begin()).
Allocator
const allocator_type get_allocator () const;
Returns a copy of the allocator used by self for storage management.
Member Functions
basic_string&
append (const basic_string& s, size_type pos, size_type npos);
basic_string&
append (const basic_string& s);
basic_string&
append (const charT* s, size_type n);
basic_string&
append (const charT* s);
basic_string&
append (size_type n, charT c );
template<class InputIterator>
basic_string&
append (InputIterator first, InputIterator last);
Append another string to the end of this string. The first two functions append the lesser of n and s.size() - pos characters
of s, beginning at position pos to this string. The second member will throw an out_of_range exception if pos >
str.size(). The third member appends n characters of the array pointed to by s. The fourth variation appends elements
from the array pointed to by s up to, but not including, a traits::eos() character. The fifth variation appends n repetitions
of c. The final append function appends the elements specified in the range [first, last).
All functions will throw a length_error exception if the resulting length will exceed max_size(). All return a reference to
this string after completion.
basic_string&
assign (const basic_string& s);
basic_string&
assign (const basic_string& s,
size_type pos, size_type n);
basic_string&
assign (const charT* s, size_type n);
basic_string&
assign (const charT* s);
basic_string&
assign (size_type n, charT c );