bsl::basic_string<wchar_t>::assign

assign overloads

Synopses

Declared in <bslstl_string.h>

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_move_assignment, and return a reference providing modifiable access to this string. The content of replacement is moved (in constant time) to this string if get_allocator() == rhs.get_allocator() (after accounting for the aforementioned trait). replacement is left in a valid but unspecified state. Note that this method has exactly the same behavior as the corresponding operator=.

basic_string<wchar_t>&
assign(BloombergLP::bslmf::MovableRef<basic_string<wchar_t>> replacement) noexcept(false);
» 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. Return a reference providing modifiable access to this string.

basic_string<wchar_t>&
assign(std::initializer_list<wchar_t> values);
» more...

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=.

basic_string<wchar_t>&
assign(basic_string<wchar_t> const& replacement);
» more...

Assign to this string the value of the specified null-terminated characterString (of length CHAR_TRAITS::length(characterString)), and return a reference providing modifiable access to this string.

basic_string<wchar_t>&
assign(wchar_t const* characterString);
» more...

Assign to this string the value of the specified replacement, and return a reference providing modifiable access to this string. Note that this method has exactly the same behavior as the corresponding operator=.

template<class STRING_VIEW_LIKE_TYPE>
basic_string<wchar_t>&
assign(STRING_VIEW_LIKE_TYPE const& replacement);
» more...

Assign to this string the value of the specified string, and return a reference providing modifiable access to this string.

template<class ALLOC2>
basic_string<wchar_t>&
assign(std::basic_string<wchar_t, char_traits<wchar_t>, ALLOC2> const& string);
» more...

Assign to this string the value of a string of the specified numChars length whose every character is equal to the specified character, and return a reference providing modifiable access to this string.

basic_string<wchar_t>&
assign(
    size_type numChars,
    wchar_t character);
» more...

Assign to this string the specified initial numChars characters in the specified characterString, and return a reference providing modifiable access to this string. The behavior is undefined unless characterString is at least numChars long.

basic_string<wchar_t>&
assign(
    wchar_t const* characterString,
    size_type numChars);
» more...

Assign to this string the characters in the range starting at the specified first iterator and ending right before the specified last iterator of the (template parameter) type INPUT_ITER. Return a reference providing modifiable access to this string. The behavior is undefined unless first and last refer to a sequence of valid values where first is at a position at or before last.

template<class INPUT_ITER>
basic_string<wchar_t>&
assign(
    INPUT_ITER first,
    INPUT_ITER last);
» more...

Assign to this string the value of the optionally specified numChars characters starting at the specified position in the specified replacement string, or the suffix of replacement starting at position if position + numChars > replacement.length(). If numChars is not specified, npos is used. Return a reference providing modifiable access to this string. Throw out_of_range if position > replacement.length().

basic_string<wchar_t>&
assign(
    basic_string<wchar_t> const& replacement,
    size_type position,
    size_type numChars = npos);
» more...

Assign to this string the value of the optionally specified numChars characters starting at the specified position in the specified replacement, or the suffix of the replacement starting at position if position + numChars > replacement.length(). If numChars is not specified, npos is used. Return a reference providing modifiable access to this string. Throw out_of_range if position > replacement.length().

template<class STRING_VIEW_LIKE_TYPE>
basic_string<wchar_t>&
assign(
    STRING_VIEW_LIKE_TYPE const& replacement,
    size_type position,
    size_type numChars = npos);
» more...