Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext
url_view_base::encoded_path

Return the path.

Synopsis
pct_string_view
encoded_path() const;
Description

This function returns the path as a string. The path may be empty. Any percent-escapes in the string are decoded first.

Example
assert( [link url.ref.boost__urls__url_view_base.url_view `url_view`]( "file:///Program%20Files/Games/config.ini" ).[link url.ref.boost__urls__url_view_base.encoded_path `encoded_path`]() == "/Program%20Files/Games/config.ini" );
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_segments. path, segments.


PrevUpHomeNext