[#bsl-basic_string-0fb-append-0a] = xref:bsl.adoc[bsl]::xref:bsl/basic_string-0fb.adoc[basic_string<char>]::append :relfileprefix: ../../ :mrdocs: `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. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:bsl/basic_string-0faf.adoc[basic_string<char>]& xref:bsl/basic_string-0fb/append-0e.adoc[append](std::initializer_list<char> values); ---- [.small]#xref:bsl/basic_string-0fb/append-0e.adoc[_» more..._]# Append to this string the specified `suffix`, and return a reference providing modifiable access to this string. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:bsl/basic_string-0faf.adoc[basic_string<char>]& xref:bsl/basic_string-0fb/append-097.adoc[append](xref:bsl/basic_string-0faf.adoc[basic_string<char>] const& suffix); ---- [.small]#xref:bsl/basic_string-0fb/append-097.adoc[_» more..._]# 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. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:bsl/basic_string-0faf.adoc[basic_string<char>]& xref:bsl/basic_string-0fb/append-006.adoc[append](char const* characterString); ---- [.small]#xref:bsl/basic_string-0fb/append-006.adoc[_» more..._]# 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()`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class STRING_VIEW_LIKE_TYPE> xref:bsl/basic_string-0faf.adoc[basic_string<char>]& xref:bsl/basic_string-0fb/append-089.adoc[append](STRING_VIEW_LIKE_TYPE const& suffix); ---- [.small]#xref:bsl/basic_string-0fb/append-089.adoc[_» more..._]# Append the specified `numChars` copies of the specified `character` to this string, and return a reference providing modifiable access to this string. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:bsl/basic_string-0faf.adoc[basic_string<char>]& xref:bsl/basic_string-0fb/append-007.adoc[append]( xref:bsl/basic_string-0fb/size_type.adoc[size_type] numChars, char character); ---- [.small]#xref:bsl/basic_string-0fb/append-007.adoc[_» more..._]# 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. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:bsl/basic_string-0faf.adoc[basic_string<char>]& xref:bsl/basic_string-0fb/append-08e.adoc[append]( char const* characterString, xref:bsl/basic_string-0fb/size_type.adoc[size_type] numChars); ---- [.small]#xref:bsl/basic_string-0fb/append-08e.adoc[_» more..._]# 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`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class INPUT_ITER> xref:bsl/basic_string-0faf.adoc[basic_string<char>]& xref:bsl/basic_string-0fb/append-03.adoc[append]( INPUT_ITER first, INPUT_ITER last); ---- [.small]#xref:bsl/basic_string-0fb/append-03.adoc[_» more..._]# 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()`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:bsl/basic_string-0faf.adoc[basic_string<char>]& xref:bsl/basic_string-0fb/append-05.adoc[append]( xref:bsl/basic_string-0faf.adoc[basic_string<char>] const& suffix, xref:bsl/basic_string-0fb/size_type.adoc[size_type] position, xref:bsl/basic_string-0fb/size_type.adoc[size_type] numChars = npos); ---- [.small]#xref:bsl/basic_string-0fb/append-05.adoc[_» more..._]# 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()`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class STRING_VIEW_LIKE_TYPE> xref:bsl/basic_string-0faf.adoc[basic_string<char>]& xref:bsl/basic_string-0fb/append-090.adoc[append]( STRING_VIEW_LIKE_TYPE const& suffix, xref:bsl/basic_string-0fb/size_type.adoc[size_type] position, xref:bsl/basic_string-0fb/size_type.adoc[size_type] numChars = npos); ---- [.small]#xref:bsl/basic_string-0fb/append-090.adoc[_» more..._]# [.small]#Created with https://www.mrdocs.com[MrDocs]#