Boost
C++ Libraries
...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
Constructor.
segments_encoded_view( 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()
Linear in s.
Exceptions thrown on invalid input.
|
Type |
Thrown On |
|---|---|
|
|
|
|
Name |
Description |
|---|---|
|
|
The string to parse. |
path = [ "/" ] [ segment *( "/" segment ) ] segment = *pchar