A URI (Universal Resource Identifier) parser/builder that aims to be RFC 3986 compliant.
More...
#include <uri.h>
|
| Uri ()=default |
|
| Uri (const std::string &uri) |
| Construct a URI from a string.
|
|
EGT_NODISCARD const std::string & | fragment () const |
| Get the fragment part of the URI.
|
|
EGT_NODISCARD const std::string & | host () const |
| Get the host part of the URI.
|
|
EGT_NODISCARD const std::string & | icon_size () const |
| Get the icon size of the URI.
|
|
EGT_NODISCARD bool | is_valid () const |
| Is the URI syntactically valid.
|
|
| operator std::string () const |
| Convert the URI to a string.
|
|
EGT_NODISCARD const std::string & | path () const |
| Get the path part of the URI.
|
|
EGT_NODISCARD const std::string & | port () const |
| Get the port part of the URI.
|
|
EGT_NODISCARD const std::string & | query () const |
| Get the query part of the URI.
|
|
EGT_NODISCARD const std::string & | scheme () const |
| Get the scheme part of the URI.
|
|
void | set (const std::string &uri) |
| Set the URI from a string.
|
|
EGT_NODISCARD std::string | to_string () const |
| Convert the URI to a string.
|
|
A URI (Universal Resource Identifier) parser/builder that aims to be RFC 3986 compliant.
The current implementation uses the regex recommended by https://tools.ietf.org/html/rfc3986#page-50
◆ Uri() [1/2]
◆ Uri() [2/2]
Uri |
( |
const std::string & |
uri | ) |
|
|
explicit |
Construct a URI from a string.
- Parameters
-
◆ fragment()
EGT_NODISCARD const std::string & fragment |
( |
| ) |
const |
|
inline |
Get the fragment part of the URI.
◆ host()
EGT_NODISCARD const std::string & host |
( |
| ) |
const |
|
inline |
Get the host part of the URI.
◆ icon_size()
EGT_NODISCARD const std::string & icon_size |
( |
| ) |
const |
|
inline |
Get the icon size of the URI.
◆ is_valid()
EGT_NODISCARD bool is_valid |
( |
| ) |
const |
Is the URI syntactically valid.
◆ operator std::string()
operator std::string |
( |
| ) |
const |
|
inlineexplicit |
Convert the URI to a string.
◆ path()
EGT_NODISCARD const std::string & path |
( |
| ) |
const |
|
inline |
Get the path part of the URI.
◆ port()
EGT_NODISCARD const std::string & port |
( |
| ) |
const |
|
inline |
Get the port part of the URI.
◆ query()
EGT_NODISCARD const std::string & query |
( |
| ) |
const |
|
inline |
Get the query part of the URI.
◆ scheme()
EGT_NODISCARD const std::string & scheme |
( |
| ) |
const |
|
inline |
Get the scheme part of the URI.
◆ set()
void set |
( |
const std::string & |
uri | ) |
|
|
inline |
Set the URI from a string.
◆ to_string()
EGT_NODISCARD std::string to_string |
( |
| ) |
const |
Convert the URI to a string.