[#bsl-basic_string-0faf-insert-03a] = xref:bsl.adoc[bsl]::xref:bsl/basic_string-0faf.adoc[basic_string]::insert :relfileprefix: ../../ :mrdocs: Insert characters into this string. == Synopsis Declared in `<bslstl_string.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class STRING_VIEW_LIKE_TYPE> xref:bsl/basic_string-0faf.adoc[basic_string]& insert( xref:bsl/basic_string-0faf/size_type.adoc[size_type] position, STRING_VIEW_LIKE_TYPE const& other); ---- == Description Insert at the specified `position` in this string the `bsl::string_view` object, obtained from the specified `other`, and return a reference providing modifiable access to this string. Throw `out_of_range` if `position > length()`. Throw `length_error` if the length of the resulting string exceeds `max_size()`. == Return Value reference providing modifiable access to this string == Parameters [cols="1,4"] |=== | Name| Description | *other* | string or character sequence to compare or use | *position* | starting index |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#