Constructor
<include/boost/url/segments_encoded_view.hpp>
segments_encoded_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.
segments_encoded_view ps( "/path/to/file.txt" );
return parse_path( s ).value();
this->buffer().data() == s.data()
path = [ "/" ] [ segment *( "/" segment ) ]
segment = *pchar
Name | Thrown on |
---|---|
`s` |
contains an invalid path. |
Name | Description |
---|---|
s | The string to parse. |