...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
Assign to the string.
template< typename T> basic_static_string& assign( const T& t, size_type pos, size_type count = npos);
Replaces the contents with those of the substring sv
,
where sv
is string_view_type(t).substr(pos, count)
.
Linear in sv.size()
.
Strong guarantee.
The view can contain null characters.
Type |
Description |
---|---|
|
A type convertible to |
std::is_convertible<const T&, string_view>::value && !std::is_convertible<const T&, const CharT*>::value && !std::is_convertible<const T&, const basic_static_string&>::value
*this
Name |
Description |
---|---|
|
The object to assign from. |
|
The index at which to begin the substring. |
|
The size of the substring. The default argument for this parameter
is |
Type |
Thrown On |
---|---|
|
|