Insert segments
<include/boost/url/segments_encoded_ref.hpp>
iterator
insert(
iterator before,
pct_string_view s);
» more...
iterator
insert(
iterator before,
std::initializer_list<pct_string_view> init);
» more...
template<class FwdIt>
iterator
insert(
iterator before,
FwdIt first,
FwdIt last);
» more...
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.
Calls to allocate may throw. Exceptions thrown on invalid input.
Name | Thrown on |
---|---|
[object Object] |
segment contains an invalid percent-encoding. |
An iterator to the inserted segment.
Name | Description |
---|---|
before | An iterator before which the segment is inserted. This may be equal to `end()`. |
s | The segment to insert. |
init | The list of segments to insert. |
first, | last The range of segments to insert. |