![]() |
Home | Libraries | People | FAQ | More |
(Inherited from url_base
)
Set if the path is absolute.
bool set_path_absolute( bool absolute);
This function adjusts the path to make it absolute or not, depending on the parameter.
If an authority is present, the path is always absolute. In this case, the function has no effect.
[link url.ref.boost__urls__url_base.url `url`] u( "path/to/file.txt" ); assert( u.set_path_absolute( true ) ); assert( u.buffer() == "/path/to/file.txt" );
this->[link url.ref.boost__urls__static_url_base.is_path_absolute `is_path_absolute`]() == true && this->[link url.ref.boost__urls__static_url_base.encoded_path `encoded_path`]().[link url.ref.boost__urls__pct_string_view.front `front`]() == '/'
true on success.
Linear in this->size()
.
[link url.ref.boost__urls__static_url_base.path `path`] = [link url.ref.boost__urls__static_url_base.path `path`]-abempty ; begins with "/" or is [link url.ref.boost__urls__static_url_base.empty `empty`] / [link url.ref.boost__urls__static_url_base.path `path`]-absolute ; begins with "/" but not "//" / [link url.ref.boost__urls__static_url_base.path `path`]-noscheme ; begins with a non-colon segment / [link url.ref.boost__urls__static_url_base.path `path`]-rootless ; begins with a segment / [link url.ref.boost__urls__static_url_base.path `path`]-[link url.ref.boost__urls__static_url_base.empty `empty`] ; zero characters [link url.ref.boost__urls__static_url_base.path `path`]-abempty = *( "/" segment ) [link url.ref.boost__urls__static_url_base.path `path`]-absolute = "/" [ segment-nz *( "/" segment ) ] [link url.ref.boost__urls__static_url_base.path `path`]-noscheme = segment-nz-nc *( "/" segment ) [link url.ref.boost__urls__static_url_base.path `path`]-rootless = segment-nz *( "/" segment ) [link url.ref.boost__urls__static_url_base.path `path`]-[link url.ref.boost__urls__static_url_base.empty `empty`] = 0<pchar>