append overloads

Synopses

Declared in <bslstl_string.h>

Append to this string each CHAR_TYPE object in the specified values initializer list, and return a reference providing modifiable access to this string.

basic_string<char>&
append(std::initializer_list<char> values);

Append to this string the specified suffix, and return a reference providing modifiable access to this string.

Append the specified null‐terminated characterString (of length CHAR_TRAITS::length(characterString)) to this string, and return a reference providing modifiable access to this string.

basic_string<char>&
append(char const* characterString);

Append to this string the bsl::string_view object, obtained from the specified suffix, and return a reference providing modifiable access to this string. Throw length_error if the length of the resulting string exceeds max_size().

template<class STRING_VIEW_LIKE_TYPE>
basic_string<char>&
append(STRING_VIEW_LIKE_TYPE const& suffix);

Append the specified numChars copies of the specified character to this string, and return a reference providing modifiable access to this string.

basic_string<char>&
append(
    size_type numChars,
    char character);

Append to this string the specified initial numChars characters from the specified characterString, and return a reference providing modifiable access to this string. The behavior is undefined unless characterString is at least numChars long.

basic_string<char>&
append(
    char const* characterString,
    size_type numChars);

Append to this string the characters in the range starting at the specified first iterator and ending right before the specified last iterator of the (template parameter) type INPUT_ITER. Return a reference providing modifiable access to this string. The behavior is undefined unless first and last refer to a sequence of valid values where first is at a position at or before last.

template<class INPUT_ITER>
basic_string<char>&
append(
    INPUT_ITER first,
    INPUT_ITER last);

Append to this string the optionally specified numChars characters starting at the specified position in the specified suffix, or the tail of suffix starting at position if position + numChars > suffix.length(). If numChars is not specified, npos is used. Return a reference providing modifiable access to this string. Throw out_of_range if position > suffix.length().

basic_string<char>&
append(
    basic_string<char> const& suffix,
    size_type position,
    size_type numChars = npos);

Append to this string the optionally specified numChars characters starting at the specified position in the bsl::string_view object, obtained from the specified suffix, or its tail starting at position if numChars exceeds the length of this tail. If numChars is not specified, npos is used. Return a reference providing modifiable access to this string. Throw out_of_range if position > strView.length(). Throw length_error if the length of the resulting string exceeds max_size().

template<class STRING_VIEW_LIKE_TYPE>
basic_string<char>&
append(
    STRING_VIEW_LIKE_TYPE const& suffix,
    size_type position,
    size_type numChars = npos);

Created with MrDocs