[#bsl-basic_string-0fb-operator_assign-0b] = xref:bsl.adoc[bsl]::xref:bsl/basic_string-0fb.adoc[basic_string<char>]::operator= :relfileprefix: ../../ :mrdocs: Assignment operators == Synopses Declared in `<bslstl_string.h>` 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<char>]& xref:bsl/basic_string-0fb/operator_assign-03.adoc[operator=](char character); ---- [.small]#xref:bsl/basic_string-0fb/operator_assign-03.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<char>]& xref:bsl/basic_string-0fb/operator_assign-0d.adoc[operator=](xref:BloombergLP/bslmf/MovableRef.adoc[BloombergLP::bslmf::MovableRef<basic_string<char>>] rhs) noexcept(/* see-below */); ---- [.small]#xref:bsl/basic_string-0fb/operator_assign-0d.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<char>]& xref:bsl/basic_string-0fb/operator_assign-08.adoc[operator=](std::initializer_list<char> values); ---- [.small]#xref:bsl/basic_string-0fb/operator_assign-08.adoc[_» more..._]# 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<char>]& xref:bsl/basic_string-0fb/operator_assign-0f.adoc[operator=](xref:bsl/basic_string-0faf.adoc[basic_string<char>] const& rhs); ---- [.small]#xref:bsl/basic_string-0fb/operator_assign-0f.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<char>]& xref:bsl/basic_string-0fb/operator_assign-09.adoc[operator=](char const* rhs); ---- [.small]#xref:bsl/basic_string-0fb/operator_assign-09.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<char>]& xref:bsl/basic_string-0fb/operator_assign-02.adoc[operator=](STRING_VIEW_LIKE_TYPE const& rhs); ---- [.small]#xref:bsl/basic_string-0fb/operator_assign-02.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<char>]& xref:bsl/basic_string-0fb/operator_assign-04.adoc[operator=](std::basic_string<char, char_traits<char>, ALLOC2> const& rhs); ---- [.small]#xref:bsl/basic_string-0fb/operator_assign-04.adoc[_» more..._]# [.small]#Created with https://www.mrdocs.com[MrDocs]#