[#bsl-basic_string-0faf-operator_assign-00] = xref:bsl.adoc[bsl]::xref:bsl/basic_string-0faf.adoc[basic_string]::operator= :relfileprefix: ../../ :mrdocs: Assignment operators == Synopses Declared in `<bslstl_string.h>` Assign to this string the value of the specified `rhs` string, propagate to this object the allocator of `rhs` if the `ALLOCATOR` type has trait `propagate_on_container_copy_assignment`, and return a reference providing modifiable access to this string. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:bsl/basic_string-0faf.adoc[basic_string]& xref:bsl/basic_string-0faf/operator_assign-08.adoc[operator=](xref:bsl/basic_string-0faf.adoc[basic_string] const& rhs); ---- [.small]#xref:bsl/basic_string-0faf/operator_assign-08.adoc[_» more..._]# Assign to this string the value of the string of length one consisting of the specified `character`, and return a reference providing modifiable access to this string. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:bsl/basic_string-0faf.adoc[basic_string]& xref:bsl/basic_string-0faf/operator_assign-01.adoc[operator=](CHAR_TYPE character); ---- [.small]#xref:bsl/basic_string-0faf/operator_assign-01.adoc[_» more..._]# Move‐assign from the specified `rhs` string and return `*this`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:bsl/basic_string-0faf.adoc[basic_string]& xref:bsl/basic_string-0faf/operator_assign-06a.adoc[operator=](xref:BloombergLP/bslmf/MovableRef.adoc[BloombergLP::bslmf::MovableRef<basic_string>] rhs) noexcept(/* see-below */); ---- [.small]#xref:bsl/basic_string-0faf/operator_assign-06a.adoc[_» more..._]# Assign to this string the value resulting from first clearing this string and then inserting (in order) each `CHAR_TYPE` object in the specified `values` initializer list. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:bsl/basic_string-0faf.adoc[basic_string]& xref:bsl/basic_string-0faf/operator_assign-07.adoc[operator=](std::initializer_list<CHAR_TYPE> values); ---- [.small]#xref:bsl/basic_string-0faf/operator_assign-07.adoc[_» more..._]# Assign to this string the value of the specified null‐terminated `rhs` string (of length `CHAR_TRAITS::length(characterString)`), and return a reference providing modifiable access to this string. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:bsl/basic_string-0faf.adoc[basic_string]& xref:bsl/basic_string-0faf/operator_assign-064.adoc[operator=](CHAR_TYPE const* rhs); ---- [.small]#xref:bsl/basic_string-0faf/operator_assign-064.adoc[_» more..._]# Assign to this string the value of the specified `rhs` object, and return a reference providing modifiable access to this string. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class STRING_VIEW_LIKE_TYPE> xref:bsl/basic_string-0faf.adoc[basic_string]& xref:bsl/basic_string-0faf/operator_assign-038.adoc[operator=](STRING_VIEW_LIKE_TYPE const& rhs); ---- [.small]#xref:bsl/basic_string-0faf/operator_assign-038.adoc[_» more..._]# Assign to this string the value of the specified `rhs` string, and return a reference providing modifiable access to this string. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class ALLOC2> xref:bsl/basic_string-0faf.adoc[basic_string]& xref:bsl/basic_string-0faf/operator_assign-034.adoc[operator=](std::basic_string<CHAR_TYPE, CHAR_TRAITS, ALLOC2> const& rhs); ---- [.small]#xref:bsl/basic_string-0faf/operator_assign-034.adoc[_» more..._]# [.small]#Created with https://www.mrdocs.com[MrDocs]#