boost::urls::segments_ref::insert

Insert segments

Synopsis

iterator
insert(
    iterator before,
    core::string_view s);
iterator
insert(
    iterator before,
    std::initializer_list<core::string_view> init);
template<class FwdIt>
iterator
insert(
    iterator before,
    FwdIt first,
    FwdIt last);

Description

This function inserts a segment before the specified position. Reserved characters in the segment are automatically escaped.

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.

Return Value

An iterator to the inserted segment.

Parameters

Name Description

before

An iterator before which the segment is inserted&period; This may be equal to &grave;end()&grave;&period;

s

The segment to insert&period;

init

The list of segments to insert&period;

first,

last The range of segments to insert&period;

Created with MrDocs