[#bsl-basic_string-0faf-append-0b] = xref:bsl.adoc[bsl]::xref:bsl/basic_string-0faf.adoc[basic_string]::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]& xref:bsl/basic_string-0faf/append-011.adoc[append](std::initializer_list<CHAR_TYPE> values); ---- [.small]#xref:bsl/basic_string-0faf/append-011.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]& xref:bsl/basic_string-0faf/append-0f.adoc[append](xref:bsl/basic_string-0faf.adoc[basic_string] const& suffix); ---- [.small]#xref:bsl/basic_string-0faf/append-0f.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]& xref:bsl/basic_string-0faf/append-07.adoc[append](CHAR_TYPE const* characterString); ---- [.small]#xref:bsl/basic_string-0faf/append-07.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]& xref:bsl/basic_string-0faf/append-02.adoc[append](STRING_VIEW_LIKE_TYPE const& suffix); ---- [.small]#xref:bsl/basic_string-0faf/append-02.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]& xref:bsl/basic_string-0faf/append-05.adoc[append]( xref:bsl/basic_string-0faf/size_type.adoc[size_type] numChars, CHAR_TYPE character); ---- [.small]#xref:bsl/basic_string-0faf/append-05.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]& xref:bsl/basic_string-0faf/append-0d.adoc[append]( CHAR_TYPE const* characterString, xref:bsl/basic_string-0faf/size_type.adoc[size_type] numChars); ---- [.small]#xref:bsl/basic_string-0faf/append-0d.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]& xref:bsl/basic_string-0faf/append-01e.adoc[append]( INPUT_ITER first, INPUT_ITER last); ---- [.small]#xref:bsl/basic_string-0faf/append-01e.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]& xref:bsl/basic_string-0faf/append-06.adoc[append]( xref:bsl/basic_string-0faf.adoc[basic_string] const& suffix, xref:bsl/basic_string-0faf/size_type.adoc[size_type] position, xref:bsl/basic_string-0faf/size_type.adoc[size_type] numChars = npos); ---- [.small]#xref:bsl/basic_string-0faf/append-06.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]& xref:bsl/basic_string-0faf/append-08.adoc[append]( STRING_VIEW_LIKE_TYPE const& suffix, xref:bsl/basic_string-0faf/size_type.adoc[size_type] position, xref:bsl/basic_string-0faf/size_type.adoc[size_type] numChars = npos); ---- [.small]#xref:bsl/basic_string-0faf/append-08.adoc[_» more..._]# [.small]#Created with https://www.mrdocs.com[MrDocs]#