[#boost-urls-segments_ref-erase-0af5] = xref:boost.adoc[boost]::xref:boost/urls.adoc[urls]::xref:boost/urls/segments_ref.adoc[segments_ref]::erase :relfileprefix: ../../../ :mrdocs: Erase segments == Synopsis Declared in `<https://www.github.com/boostorg/url/blob/develop/include/boost/url/segments_ref.hpp#L522[boost/url/segments_ref.hpp]>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:boost/urls/segments_base/iterator.adoc[iterator] erase( xref:boost/urls/segments_base/iterator.adoc[iterator] first, xref:boost/urls/segments_base/iterator.adoc[iterator] last) noexcept; ---- == Description This function removes a range of segments. All iterators that are equal to `first` or come after are invalidated. === Complexity Linear in `this‐>url().encoded_resource().size()`. === Exception Safety Throws nothing. == Return Value An iterator to one past the removed range. == Parameters |=== | Name | Description | *first* | The beginning of the range to remove. | *last* | The end of the range to remove. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#