...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
Insert a range of characters.
template< class InputIt> string& insert( size_type pos, InputIt first, InputIt last);
Inserts characters from the range {first, last)
before the character at index pos
.
{first, last)
is a valid range.
Strong guarantee.
All references, pointers, or iterators referring to contained elements are invalidated. Any past-the-end iterators are also invalidated.
Type |
Description |
---|---|
|
The type of the iterators. |
InputIt
satisfies InputIterator.
*this
Name |
Description |
---|---|
|
The index to insert at. |
|
The beginning of the character range. |
|
The end of the character range. |
Type |
Thrown On |
---|---|
|
|
|
|