HikoGUI
A low latency retained GUI
|
#include <hikogui/path/URI.hpp>
Public Member Functions | |
constexpr | path_type (path_type const &) noexcept=default |
constexpr | path_type (path_type &&) noexcept=default |
constexpr path_type & | operator= (path_type const &) noexcept=default |
constexpr path_type & | operator= (path_type &&) noexcept=default |
constexpr | path_type (std::string_view str) noexcept |
constexpr bool | absolute () const noexcept |
constexpr bool | double_absolute () const noexcept |
constexpr bool | is_root () const noexcept |
constexpr std::optional< std::string > | filename () const noexcept |
constexpr path_type & | remove_filename () noexcept |
Remove the filename part of the path. | |
constexpr bool | holds_invariant () const noexcept |
Public Member Functions inherited from std::vector< std::string > | |
std::string | push_back (std::string ... args) |
std::string | crbegin (std::string ... args) |
std::string | erase (std::string ... args) |
std::string | data (std::string ... args) |
std::string | insert (std::string ... args) |
std::string | pop_back (std::string ... args) |
std::string | shrink_to_fit (std::string ... args) |
std::string | back (std::string ... args) |
std::string | end (std::string ... args) |
std::string | resize (std::string ... args) |
std::string | emplace_back (std::string ... args) |
std::string | size (std::string ... args) |
std::string | cbegin (std::string ... args) |
std::string | front (std::string ... args) |
std::string | ~vector (std::string ... args) |
std::string | rbegin (std::string ... args) |
std::string | crend (std::string ... args) |
std::string | assign (std::string ... args) |
std::string | operator= (std::string ... args) |
std::string | vector (std::string ... args) |
std::string | reserve (std::string ... args) |
std::string | capacity (std::string ... args) |
std::string | empty (std::string ... args) |
std::string | cend (std::string ... args) |
std::string | swap (std::string ... args) |
std::string | max_size (std::string ... args) |
std::string | rend (std::string ... args) |
std::string | get_allocator (std::string ... args) |
std::string | clear (std::string ... args) |
std::string | at (std::string ... args) |
std::string | emplace (std::string ... args) |
std::string | operator[] (std::string ... args) |
std::string | begin (std::string ... args) |
Static Public Member Functions | |
static constexpr std::vector< std::string > | parse (std::string_view str) |
Friends | |
constexpr friend path_type | merge (path_type base, path_type const &ref, bool base_has_authority) noexcept |
constexpr friend path_type | remove_dot_segments (path_type path) noexcept |
constexpr friend size_t | to_string_size (path_type const &rhs) noexcept |
constexpr friend std::string | to_string (path_type const &rhs, bool has_scheme=false) noexcept |
Convert the URI path component to a string. | |
Additional Inherited Members | |
Data Fields inherited from std::vector< std::string > | |
std::string | elements |
STL member. | |
A path type.
A path is a vector of path-segments:
Path string | Segment list |
---|---|
"" | [] |
"/" | ["", ""] |
"filename" | ["filename"] |
"/filename" | ["", "filename"] |
"dirname/" | ["dirname", ""] |
"/dirname/" | ["", "dirname", ""] |
"/dirname/filename" | ["", "dirname", "filename"] |
"." | [".", ""] |
"/." | ["", ".", ""] |
"./" | [".", ""] |
"/./" | ["", ".", ""] |
"/./." | ["", ".", ".", ""] |
".." | ["..", ""] |
"/.." | ["", "..", ""] |
"../" | ["..", ""] |
"/../" | ["", "..", ""] |
"/../.." | ["", "..", ".", ""] |
|
inlineconstexprnoexcept |
Remove the filename part of the path.
Path | List | Result Path | Result List |
---|---|---|---|
".." | ["..", ""] | "" | [""] |
"/.." | ["", "..", ""] | "" | [""] |
"foo/.." | ["foo", "..", ""] | "" | [""] |
"/foo/.." | ["", "foo", "..", ""] | "/" | ["", ""] |
"baz/foo/.." | ["baz", "foo", "..", ""] | "baz/" | ["baz", ""] |
"/baz/foo/.." | ["", "baz", "foo", "..", ""] | "/baz/" | ["", "baz", ""] |
| | | "../" | ["..", ""] | "" | [""] "/../" | ["", "..", ""] | "" | [""] "foo/../" | ["foo", "..", ""] | "" | [""] "/foo/../" | ["", "foo", "..", ""] | "/" | ["", ""] "baz/foo/../" | ["baz", "foo", "..", ""] | "baz/" | ["baz", ""] "/baz/foo/../" | ["", "baz", "foo", "..", ""] | "/baz/" | ["", "baz", ""] | | | "../bar" | ["..", "bar"] | "bar" | ["bar"] "/../bar" | ["", "..", "bar"] | "bar" | ["bar"] "foo/../bar" | ["foo", "..", "bar"] | "bar" | ["bar"] "/foo/../bar" | ["", "foo", "..", "bar"] | "/bar" | ["", "bar"] "baz/foo/../bar" | ["baz", "foo", "..", "bar"] | "baz/bar" | ["baz", "bar"] "/baz/foo/../bar" | ["", "baz", "foo", "..", "bar"] | "/baz/bar" | ["", "baz", "bar"]
|
friend |