std::basic_string<CharT,Traits,Allocator>::push_back (3) - Linux Manuals

std::basic_string<CharT,Traits,Allocator>::push_back: std::basic_string<CharT,Traits,Allocator>::push_back

NAME

std::basic_string<CharT,Traits,Allocator>::push_back - std::basic_string<CharT,Traits,Allocator>::push_back

Synopsis


void push_back( CharT ch );


Appends the given character ch to the end of the string.

Parameters


ch - the character to append

Return value


(none)

Complexity


Amortized constant.

Exceptions


If an exception is thrown for any reason, this function has no effect (strong exception guarantee).
(since C++11)
If the operation would result in size() > max_size(), throws std::length_error.

See also


pop_back removes the last character
         (public member function)
(C++11)