Erase a range of elements.
iterator erase( iterator first, iterator last);
This function erases the elements in the range [first, last)
,
which must be a valid range in the container. All references and iterators
starting from first
and
up to and including the last element and end
iterators are invalidated.
[first, last)
is a valid range in this container.
url u = parse_relative_uri( "/path/to/the/file.txt" ); segments se = u.segments(); se.erase( se.begin() + 1, se.begin() + 3 ); assert( u.encoded_path() == "/path/file.txt" );
An iterator following the last element erased.
Name |
Description |
---|---|
|
The beginning of the range to erase. |
|
The end of the range to erase. |
Type |
Thrown On |
---|---|
|
invalid percent-encoding |