[#bsl-basic_string-0faf-insert-08]
= xref:bsl.adoc[bsl]::xref:bsl/basic_string-0faf.adoc[basic&lowbar;string]::insert
:relfileprefix: ../../
:mrdocs:

Insert characters into this string&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:bsl/basic_string-0faf/iterator.adoc[iterator]
insert(
    xref:bsl/basic_string-0faf/const_iterator.adoc[const&lowbar;iterator] position,
    CHAR&lowbar;TYPE character);
----

== Description

Insert the specified `character` at the specified `position` in this string, and return an iterator providing modifiable access to the inserted character&period; The behavior is undefined unless `position` is a valid iterator on this string&period;

== Return Value

iterator referring to the first inserted character

== Parameters

[cols="1,4"]
|===
| Name| Description
| *position*
| starting index
| *character*
| character value
|===


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