...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
Insert segments.
iterator insert( iterator before, pct_string_view s);
This function inserts a segment before the specified position. Reserved characters in the segment are automatically escaped. Escapes in the segment are preserved.
All iterators that are equal to before
or come after are invalidated.
Linear in s.size() + this->url().encoded_resource().size()
.
Strong guarantee. Calls to allocate may throw. Exceptions thrown on invalid input.
Type |
Thrown On |
---|---|
|
The segment contains an invalid percent-encoding. |
An iterator to the inserted segment.
Name |
Description |
---|---|
|
An iterator before which the segment is inserted. This may
be equal to |
|
The segment to insert. |