23 if (non_special_scheme ==
"blob") {
30 return ada::helpers::concat(
result->get_protocol(),
"//",
45 return helpers::concat(non_special_scheme,
":");
53 if (!host.has_value()) {
56 if (port.has_value()) {
57 return host.value() +
":" +
get_port();
63 return host.value_or(
"");
73 return (!query.has_value() || (query.value().empty())) ?
""
74 :
"?" + query.value();
86 return port.has_value() ? std::to_string(port.value()) :
"";
92 return (!hash.has_value() || (hash.value().empty())) ?
""
Includes all definitions for Ada.
Definitions for helper functions used within Ada.
Definitions for user facing functions for parsing URL and it's components.
constexpr std::string_view is_special_list[]
tl::expected< result_type, ada::errors > result
ada_warn_unused ada::result< result_type > parse(std::string_view input, const result_type *base_url=nullptr)
Declarations for the URL scheme.
ada_really_inline bool is_special() const noexcept
std::string get_search() const noexcept
std::string_view get_pathname() const noexcept
std::string get_host() const noexcept
std::string get_hash() const noexcept
std::string get_origin() const noexcept override
std::string get_hostname() const noexcept
const std::string & get_password() const noexcept
std::string get_port() const noexcept
const std::string & get_username() const noexcept
std::string get_protocol() const noexcept