[#bsl-basic_string-0faf-assign-08e] = xref:bsl.adoc[bsl]::xref:bsl/basic_string-0faf.adoc[basic_string]::assign :relfileprefix: ../../ :mrdocs: Assign a new value to 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]& assign(STRING_VIEW_LIKE_TYPE const& replacement); ---- == Description Assign to this string the value of the specified `replacement`, and return a reference providing modifiable access to this string. Note that this method has exactly the same behavior as the corresponding `operator=`. == Return Value reference providing modifiable access to this string == Parameters [cols="1,4"] |=== | Name| Description | *replacement* | replacement character sequence |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#