assign overloads
Synopses
Declared in <bslstl_stringref.h>
Modify this string reference to refer to the same string as the specified stringRef. Note, that the string bound to stringRef must remain valid as long as it is bound to this object.
void
assign(StringRefImp<wchar_t> const& stringRef);
Bind this string reference to the specified str string. The string indicated by str must remain valid as long as it is bound to this object.
void
assign(bsl::basic_string<wchar_t> const& str);
Bind this string reference to the string at the specified data address and extending for std::char_traits<CHAR_TYPE>::length(data) characters. The string at the data address must remain valid as long as it is bound to this string reference. The behavior is undefined unless data is null‐terminated.
void
assign(wchar_t const* data);
Bind this string reference to the string at the specified begin iterator, extending up to, but not including, the character at the specified end iterator. The string indicated by begin and end must remain valid as long as it is bound to this object. The behavior is undefined unless begin <= end. Note that the string need not be null‐terminated and may contain embedded null characters.
void
assign(
const_iterator begin,
const_iterator end);
Assign this ref to the specified data of the specified length.
void
assign(
wchar_t const* data,
size_type length);
Bind this string reference to the string at the specified data address and extending for the specified length characters. The string indicated by data and length must remain valid as long as it is bound to this object. The behavior is undefined unless 0 <= length or 0 == data && 0 == length. Note that the string need not be null‐terminated and may contain embedded null characters. Note that the template and non‐template versions combine to allow various integral and enumeration types to be used for length while preventing (char *, 0) initializer arguments from matching the two‐iterator overload of assign below.
template<class INT_TYPE>
void
assign(
wchar_t const* data,
INT_TYPE length)
requires bsl::is_integral<INT_TYPE>::value;
Created with MrDocs