string::append

Append characters to the string.

Synopsis

string&
append(
    std::size_t count,
    char ch); (1)

string&
append(
    string_view sv); (2)

template<
    class InputIt>
string&
append(
    InputIt first,
    InputIt last); (3)

Description

Appends count copies of ch to the end of the string.

Exception Safety

Strong guarantee.

Template Parameters

Type Description

InputIt

The type of the iterators.

Return Value

*this

Return Value

*this

Return Value

*this

Parameters

Name Description

count

The number of characters to append.

ch

The character to append.

sv

The string_view to append.

first

An iterator representing the first character to append.

last

An iterator one past the last character to append.

Exceptions

Type Thrown On

boost::system::system_error

size() + count > max_size().