[#bsl-basic_string-0fb-assign-017] = xref:bsl.adoc[bsl]::xref:bsl/basic_string-0fb.adoc[basic_string<char>]::assign :relfileprefix: ../../ :mrdocs: Assign to this string the value of the specified `string`, and return a reference providing modifiable access to this string. == Synopsis Declared in `<bslstl_string.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class ALLOC2> xref:bsl/basic_string-0faf.adoc[basic_string<char>]& assign(std::basic_string<char, char_traits<char>, ALLOC2> const& string); ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#