insert

Insert segments

Synopsis

segments_base::iterator
insert(
    segments_base::iterator before,
    string_view s);

Declared in file <include/boost/url/segments_ref.hpp> on line 377

Defined in file <src/segments_ref.cpp> on line 85

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.

Complexity

Linear in s.size() + this->url().encoded_resource().size().

Exception Safety

Strong guarantee. Calls to allocate may throw.