Ada 4.1.1
Fast spec-compliant URL parser
Loading...
Searching...
No Matches
ada::anonymous_namespace{implementation.cpp} Namespace Reference

Functions

ada_really_inline uint64_t swar_in_range (uint64_t w, uint8_t lo, uint8_t hi) noexcept
ada_really_inline bool eight_clean_http_host_bytes (const uint8_t *input) noexcept
std::optional< bool > try_can_parse_clean_http (std::string_view input) noexcept
std::optional< bool > try_can_parse_absolute_fast (std::string_view input) noexcept

Variables

constexpr std::array< uint8_t, 256 > clean_http_host_byte
constexpr bool k_can_parse_little_endian = false

Function Documentation

◆ eight_clean_http_host_bytes()

ada_really_inline bool ada::anonymous_namespace{implementation.cpp}::eight_clean_http_host_bytes ( const uint8_t * input)
noexcept

◆ swar_in_range()

ada_really_inline uint64_t ada::anonymous_namespace{implementation.cpp}::swar_in_range ( uint64_t w,
uint8_t lo,
uint8_t hi )
noexcept

Definition at line 54 of file implementation.cpp.

References ada_really_inline, and swar_in_range().

Referenced by eight_clean_http_host_bytes(), and swar_in_range().

◆ try_can_parse_absolute_fast()

std::optional< bool > ada::anonymous_namespace{implementation.cpp}::try_can_parse_absolute_fast ( std::string_view input)
noexcept

◆ try_can_parse_clean_http()

std::optional< bool > ada::anonymous_namespace{implementation.cpp}::try_can_parse_clean_http ( std::string_view input)
noexcept

Variable Documentation

◆ clean_http_host_byte

std::array<uint8_t, 256> ada::anonymous_namespace{implementation.cpp}::clean_http_host_byte
constexpr
Initial value:
= []() consteval {
std::array<uint8_t, 256> result{};
for (size_t i = 0; i < result.size(); ++i) {
const auto c = static_cast<uint8_t>(i);
result[i] =
static_cast<uint8_t>((c >= 'a' && c <= 'z') || (c >= '0' && c <= '9') ||
c == '-' || c == '.' || c == '_' || c == '~');
}
return result;
}()
tl::expected< result_type, ada::errors > result

Definition at line 36 of file implementation.cpp.

Referenced by try_can_parse_clean_http().

◆ k_can_parse_little_endian

bool ada::anonymous_namespace{implementation.cpp}::k_can_parse_little_endian = false
constexpr

Definition at line 85 of file implementation.cpp.

Referenced by try_can_parse_clean_http().