Ada 2.7.8
Fast spec-compliant URL parser
Loading...
Searching...
No Matches
ada::helpers Namespace Reference

Includes the definitions for helper functions. More...

Functions

ada_unused std::string get_state (ada::state s)
 
ada_really_inline int trailing_zeroes (uint32_t input_num) noexcept
 
ada_really_inline size_t find_next_host_delimiter_special (std::string_view view, size_t location) noexcept
 
ada_really_inline size_t find_next_host_delimiter (std::string_view view, size_t location) noexcept
 

Variables

static constexpr std::array< uint8_t, 256 > special_host_delimiters
 
static constexpr std::array< uint8_t, 256 > host_delimiters
 
static constexpr std::array< uint8_t, 256 > authority_delimiter_special
 
static constexpr std::array< uint8_t, 256 > authority_delimiter
 

Detailed Description

Includes the definitions for helper functions.

These functions are not part of our public API and may change at any time.

Function Documentation

◆ find_next_host_delimiter()

ada_really_inline size_t ada::helpers::find_next_host_delimiter ( std::string_view view,
size_t location )
noexcept

Definition at line 462 of file helpers.cpp.

References host_delimiters, and ada::parse().

◆ find_next_host_delimiter_special()

ada_really_inline size_t ada::helpers::find_next_host_delimiter_special ( std::string_view view,
size_t location )
noexcept

Definition at line 330 of file helpers.cpp.

References ada::parse(), and special_host_delimiters.

◆ get_state()

◆ trailing_zeroes()

ada_really_inline int ada::helpers::trailing_zeroes ( uint32_t input_num)
noexcept

Definition at line 179 of file helpers.cpp.

References ada::parse().

Variable Documentation

◆ authority_delimiter

constexpr std::array<uint8_t, 256> ada::helpers::authority_delimiter
staticconstexpr
Initial value:
= []() constexpr {
std::array<uint8_t, 256> result{};
for (int i : {'@', '/', '?'}) {
result[i] = 1;
}
return result;
}()
tl::expected< result_type, ada::errors > result

Definition at line 770 of file helpers.cpp.

◆ authority_delimiter_special

constexpr std::array<uint8_t, 256> ada::helpers::authority_delimiter_special
staticconstexpr
Initial value:
=
[]() constexpr {
std::array<uint8_t, 256> result{};
for (int i : {'@', '/', '\\', '?'}) {
result[i] = 1;
}
return result;
}()

Definition at line 748 of file helpers.cpp.

◆ host_delimiters

constexpr std::array<uint8_t, 256> ada::helpers::host_delimiters
staticconstexpr
Initial value:
= []() constexpr {
std::array<uint8_t, 256> result{};
for (int i : {':', '/', '?', '['}) {
result[i] = 1;
}
return result;
}()

Definition at line 454 of file helpers.cpp.

Referenced by find_next_host_delimiter().

◆ special_host_delimiters

constexpr std::array<uint8_t, 256> ada::helpers::special_host_delimiters
staticconstexpr
Initial value:
=
[]() constexpr {
std::array<uint8_t, 256> result{};
for (int i : {':', '/', '[', '\\', '?'}) {
result[i] = 1;
}
return result;
}()

Definition at line 321 of file helpers.cpp.

Referenced by find_next_host_delimiter_special().