Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext
url_view_base::encoded_segments

Return the path as a container of segments.

Synopsis
segments_encoded_view
encoded_segments() const;
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. Strings returned when iterating the range may contain percent escapes.

Example
[link url.ref.boost__urls__url_view_base.segments_encoded_view `segments_encoded_view`] sv = [link url.ref.boost__urls__url_view_base.url_view `url_view`]( "/path/to/file.txt" ).encoded_segments();
Complexity

Constant.

Exception Safety

Throws nothing.

BNF
[link url.ref.boost__urls__url_view_base.path `path`]          = [link url.ref.boost__urls__url_view_base.path `path`]-abempty    ; begins with "/" or is [link url.ref.boost__urls__url_view_base.empty `empty`]
              / [link url.ref.boost__urls__url_view_base.path `path`]-absolute   ; begins with "/" but not "//"
              / [link url.ref.boost__urls__url_view_base.path `path`]-noscheme   ; begins with a non-colon segment
              / [link url.ref.boost__urls__url_view_base.path `path`]-rootless   ; begins with a segment
              / [link url.ref.boost__urls__url_view_base.path `path`]-[link url.ref.boost__urls__url_view_base.empty `empty`]      ; zero characters

[link url.ref.boost__urls__url_view_base.path `path`]-abempty  = *( "/" segment )
[link url.ref.boost__urls__url_view_base.path `path`]-absolute = "/" [ segment-nz *( "/" segment ) ]
[link url.ref.boost__urls__url_view_base.path `path`]-noscheme = segment-nz-nc *( "/" segment )
[link url.ref.boost__urls__url_view_base.path `path`]-rootless = segment-nz *( "/" segment )
[link url.ref.boost__urls__url_view_base.path `path`]-[link url.ref.boost__urls__url_view_base.empty `empty`]    = 0<pchar>
Specification
See Also

is_path_absolute, encoded_path, path, segments, segments_encoded_view.


PrevUpHomeNext