...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
Replace a part of the string.
constexpr basic_static_string& replace( size_type pos, size_type n1, const_pointer s, size_type n2);
Replaces rcount
characters
starting at index pos
with those of {s, s + n2)
, where rcount
is std::min(n1, size() - pos)
.
Strong guarantee.
All references, pointers, or iterators referring to contained elements are invalidated. Any past-the-end iterators are also invalidated.
*this
Name |
Description |
---|---|
|
The index to replace at. |
|
The number of characters to replace. |
|
The string to replace with. |
|
The length of the string to replace with. |
Type |
Thrown On |
---|---|
|
|
|
|