...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 substring with a string.
string& replace( std::size_t pos, std::size_t count, string_view sv);
Replaces rcount
characters
starting at index pos
with those of sv
, where
rcount
is std::min(count, 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 |
Type |
Thrown On |
---|---|
|
|
|
|