boost::urls::url_view_base::segments

Return the path as a container of segments

Synopsis

Declared in <include/boost/url/url_view_base.hpp>

segments_view
segments() const noexcept;

Description

This function returns a bidirectional view of strings over the path. The returned view references the same underlying character buffer; ownership is not transferred. Any percent-escapes in strings returned when iterating the view are decoded first.

segments_view sv = url_view( "/path/to/file.txt" ).segments();

Constant.

Throws nothing.

path = [ "/" ] segment *( "/" segment )
  • 3.3. Path (rfc3986)
  • See Also

    is_path_absolute , encoded_path , encoded_segments . path , segments_view .

    Created with MrDocs