[#bsl-basic_string-01d-append-0fe]
= xref:bsl.adoc[bsl]::xref:bsl/basic_string-01d.adoc[basic&lowbar;string&lt;char8&lowbar;t&gt;]::append
:relfileprefix: ../../
:mrdocs:

`append` overloads

== Synopses

Declared in `&lt;bslstl&lowbar;string&period;h&gt;`

Append to this string each `CHAR&lowbar;TYPE` object in the specified `values` initializer list, and return a reference providing modifiable access to this string&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:bsl/basic_string-0faf.adoc[basic&lowbar;string&lt;char8&lowbar;t&gt;]&
xref:bsl/basic_string-01d/append-0b.adoc[append](std::initializer&lowbar;list&lt;char8&lowbar;t&gt; values);
----

[.small]#xref:bsl/basic_string-01d/append-0b.adoc[_» more&period;&period;&period;_]#

Append to this string the specified `suffix`, and return a reference providing modifiable access to this string&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:bsl/basic_string-0faf.adoc[basic&lowbar;string&lt;char8&lowbar;t&gt;]&
xref:bsl/basic_string-01d/append-06.adoc[append](xref:bsl/basic_string-0faf.adoc[basic&lowbar;string&lt;char8&lowbar;t&gt;] const& suffix);
----

[.small]#xref:bsl/basic_string-01d/append-06.adoc[_» more&period;&period;&period;_]#

Append the specified null&hyphen;terminated `characterString` (of length `CHAR&lowbar;TRAITS&colon;&colon;length(characterString)`) to this string, and return a reference providing modifiable access to this string&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:bsl/basic_string-0faf.adoc[basic&lowbar;string&lt;char8&lowbar;t&gt;]&
xref:bsl/basic_string-01d/append-04.adoc[append](char8&lowbar;t const* characterString);
----

[.small]#xref:bsl/basic_string-01d/append-04.adoc[_» more&period;&period;&period;_]#

Append to this string the `bsl&colon;&colon;string&lowbar;view` object, obtained from the specified `suffix`, and return a reference providing modifiable access to this string&period; Throw `length&lowbar;error` if the length of the resulting string exceeds `max&lowbar;size()`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class STRING&lowbar;VIEW&lowbar;LIKE&lowbar;TYPE&gt;
xref:bsl/basic_string-0faf.adoc[basic&lowbar;string&lt;char8&lowbar;t&gt;]&
xref:bsl/basic_string-01d/append-03.adoc[append](STRING&lowbar;VIEW&lowbar;LIKE&lowbar;TYPE const& suffix);
----

[.small]#xref:bsl/basic_string-01d/append-03.adoc[_» more&period;&period;&period;_]#

Append the specified `numChars` copies of the specified `character` to this string, and return a reference providing modifiable access to this string&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:bsl/basic_string-0faf.adoc[basic&lowbar;string&lt;char8&lowbar;t&gt;]&
xref:bsl/basic_string-01d/append-0f7.adoc[append](
    xref:bsl/basic_string-01d/size_type.adoc[size&lowbar;type] numChars,
    char8&lowbar;t character);
----

[.small]#xref:bsl/basic_string-01d/append-0f7.adoc[_» more&period;&period;&period;_]#

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


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:bsl/basic_string-0faf.adoc[basic&lowbar;string&lt;char8&lowbar;t&gt;]&
xref:bsl/basic_string-01d/append-0d.adoc[append](
    char8&lowbar;t const* characterString,
    xref:bsl/basic_string-01d/size_type.adoc[size&lowbar;type] numChars);
----

[.small]#xref:bsl/basic_string-01d/append-0d.adoc[_» more&period;&period;&period;_]#

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&lowbar;ITER`&period; Return a reference providing modifiable access to this string&period; 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`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class INPUT&lowbar;ITER&gt;
xref:bsl/basic_string-0faf.adoc[basic&lowbar;string&lt;char8&lowbar;t&gt;]&
xref:bsl/basic_string-01d/append-071.adoc[append](
    INPUT&lowbar;ITER first,
    INPUT&lowbar;ITER last);
----

[.small]#xref:bsl/basic_string-01d/append-071.adoc[_» more&period;&period;&period;_]#

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 &plus; numChars &gt; suffix&period;length()`&period; If `numChars` is not specified, `npos` is used&period; Return a reference providing modifiable access to this string&period; Throw `out&lowbar;of&lowbar;range` if `position &gt; suffix&period;length()`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:bsl/basic_string-0faf.adoc[basic&lowbar;string&lt;char8&lowbar;t&gt;]&
xref:bsl/basic_string-01d/append-07e.adoc[append](
    xref:bsl/basic_string-0faf.adoc[basic&lowbar;string&lt;char8&lowbar;t&gt;] const& suffix,
    xref:bsl/basic_string-01d/size_type.adoc[size&lowbar;type] position,
    xref:bsl/basic_string-01d/size_type.adoc[size&lowbar;type] numChars = npos);
----

[.small]#xref:bsl/basic_string-01d/append-07e.adoc[_» more&period;&period;&period;_]#

Append to this string the optionally specified `numChars` characters starting at the specified `position` in the `bsl&colon;&colon;string&lowbar;view` object, obtained from the specified `suffix`, or its tail starting at `position` if `numChars` exceeds the length of this tail&period; If `numChars` is not specified, `npos` is used&period; Return a reference providing modifiable access to this string&period; Throw `out&lowbar;of&lowbar;range` if `position &gt; strView&period;length()`&period; Throw `length&lowbar;error` if the length of the resulting string exceeds `max&lowbar;size()`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class STRING&lowbar;VIEW&lowbar;LIKE&lowbar;TYPE&gt;
xref:bsl/basic_string-0faf.adoc[basic&lowbar;string&lt;char8&lowbar;t&gt;]&
xref:bsl/basic_string-01d/append-05.adoc[append](
    STRING&lowbar;VIEW&lowbar;LIKE&lowbar;TYPE const& suffix,
    xref:bsl/basic_string-01d/size_type.adoc[size&lowbar;type] position,
    xref:bsl/basic_string-01d/size_type.adoc[size&lowbar;type] numChars = npos);
----

[.small]#xref:bsl/basic_string-01d/append-05.adoc[_» more&period;&period;&period;_]#


[.small]#Created with https://www.mrdocs.com[MrDocs]#
