[#bsl-basic_string-0faf-assign-07] = xref:bsl.adoc[bsl]::xref:bsl/basic_string-0faf.adoc[basic_string]::assign :relfileprefix: ../../ :mrdocs: Assign to this string the value of the specified `replacement` string. == Synopsis Declared in `<bslstl_string.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:bsl/basic_string-0faf.adoc[basic_string]& assign(xref:bsl/basic_string-0faf.adoc[basic_string] const& replacement); ---- == Description Assign to this string the value of the specified `replacement` string, propagate to this object the allocator of `replacement` if the `ALLOCATOR` type has trait `propagate_on_container_copy_assignment`, 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]#