libstdc++
GNU C++ library
Loading...
Searching...
No Matches

◆ assign() [4/16]

template<typename _CharT, typename _Traits, typename _Alloc>
basic_string & std::basic_string< _CharT, _Traits, _Alloc >::assign ( basic_string< _CharT, _Traits, _Alloc > && __str)
inlinenoexcept

Set value to contents of another string.

Parameters
__strSource string to use.
Returns
Reference to this string.

This function sets this string to the exact contents of __str. __str is a valid, but unspecified string.

Definition at line 1464 of file cow_string.h.

1466 {
1467 this->swap(__str);
1468 return *this;
1469 }
constexpr void swap(basic_string &__s) noexcept
Swap contents with another string.
Managing sequences of characters and character-like objects.