![]() |
Home | Libraries | People | FAQ | More |
Constructor.
segments_view( core::string_view s);
This function constructs segments from a valid path string, which can
contain percent escapes. Upon construction, the view references the character
buffer pointed to by s
.
caller is responsible for ensuring that the lifetime of the buffer extends
until the view is destroyed.
[link url.ref.boost__urls__segments_view.segments_view `segments_view`] ps( "/path/to/file.txt" );
return [link url.ref.boost__urls__parse_path `parse_path`]( s ).value();
this->[link url.ref.boost__urls__segments_view.buffer `buffer`]().[link url.ref.boost__urls__pct_string_view.data `data`]() == s.data()
Linear in s
.
Exceptions thrown on invalid input.
Type |
Thrown On |
---|---|
|
|
Name |
Description |
---|---|
|
The string to parse. |
path = [ "/" ] [ segment *( "/" segment ) ] segment = *pchar