[#bsl-basic_string-0fb-operator_assign-04] = xref:bsl.adoc[bsl]::xref:bsl/basic_string-0fb.adoc[basic_string<char>]::operator= :relfileprefix: ../../ :mrdocs: Assign to this string the value of the specified `rhs` 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>]& operator=(std::basic_string<char, char_traits<char>, ALLOC2> const& rhs); ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#