[#bsl-basic_string-0fb-replace-0cc] = xref:bsl.adoc[bsl]::xref:bsl/basic_string-0fb.adoc[basic_string<char>]::replace :relfileprefix: ../../ :mrdocs: Replace the substring in the range starting at the specified `first` position and ending right before the specified `last` position with the specified null‐terminated `characterString` (of length `CHAR_TRAITS::length(characterString)`). Return a reference providing modifiable access to this string. The behavior is undefined unless `first` and `last` are both within the range `[cbegin() .. cend()]` and `first <= last`. == Synopsis Declared in `<bslstl_string.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:bsl/basic_string-0faf.adoc[basic_string<char>]& replace( xref:bsl/basic_string-0fb/const_iterator.adoc[const_iterator] first, xref:bsl/basic_string-0fb/const_iterator.adoc[const_iterator] last, char const* characterString); ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#