[#bsl-basic_string-0faf-append-0b]
= xref:bsl.adoc[bsl]::xref:bsl/basic_string-0faf.adoc[basic&lowbar;string]::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]&
xref:bsl/basic_string-0faf/append-011.adoc[append](std::initializer&lowbar;list&lt;CHAR&lowbar;TYPE&gt; values);
----

[.small]#xref:bsl/basic_string-0faf/append-011.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]&
xref:bsl/basic_string-0faf/append-0f.adoc[append](xref:bsl/basic_string-0faf.adoc[basic&lowbar;string] const& suffix);
----

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

Append characters to this string&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:bsl/basic_string-0faf.adoc[basic&lowbar;string]&
xref:bsl/basic_string-0faf/append-07.adoc[append](CHAR&lowbar;TYPE const* characterString);
----

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

Append characters to this string&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]&
xref:bsl/basic_string-0faf/append-02.adoc[append](STRING&lowbar;VIEW&lowbar;LIKE&lowbar;TYPE const& suffix);
----

[.small]#xref:bsl/basic_string-0faf/append-02.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]&
xref:bsl/basic_string-0faf/append-05.adoc[append](
    xref:bsl/basic_string-0faf/size_type.adoc[size&lowbar;type] numChars,
    CHAR&lowbar;TYPE character);
----

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

Append characters to this string&period;


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

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

Append the characters in the iterator range `&lsqb;first, last)&rsqb;`&period;


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

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

Append a substring of `suffix` to this string&period;


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

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

Append characters to this string&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]&
xref:bsl/basic_string-0faf/append-08.adoc[append](
    STRING&lowbar;VIEW&lowbar;LIKE&lowbar;TYPE const& suffix,
    xref:bsl/basic_string-0faf/size_type.adoc[size&lowbar;type] position,
    xref:bsl/basic_string-0faf/size_type.adoc[size&lowbar;type] numChars = npos);
----

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

== Return Value

* reference providing modifiable access to this string
* a reference to this string

== Parameters

[cols="1,4"]
|===
| Name| Description
| *values*
| initializer list of characters
| *suffix*
| characters to append
| *characterString*
| pointer to characters
| *numChars*
| number of characters
| *character*
| character value
| *first*
| beginning of the character range to append
| *last*
| end of the character range to append (one past last)
| *position*
| starting index in `suffix`
|===


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