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 728 of file helpers.cpp.

References ada_really_inline, and host_delimiters.

## 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 467 of file helpers.cpp.

References ada_really_inline, and special_host_delimiters.

## get_state()

ada_unused std::string ada::helpers::get_state | ( | ada::state | s | ) |

Definition at line 42 of file helpers.cpp.

References ada_unused, ada::AUTHORITY, ada::FILE, ada::FILE_HOST, ada::FILE_SLASH, ada::FRAGMENT, ada::HOST, ada::NO_SCHEME, ada::OPAQUE_PATH, ada::PATH, ada::PATH_OR_AUTHORITY, ada::PATH_START, ada::PORT, ada::QUERY, ada::RELATIVE_SCHEME, ada::RELATIVE_SLASH, ada::SCHEME, ada::SCHEME_START, ada::SPECIAL_AUTHORITY_IGNORE_SLASHES, ada::SPECIAL_AUTHORITY_SLASHES, and ada::SPECIAL_RELATIVE_OR_AUTHORITY.

Referenced by ada::to_string().

## trailing_zeroes()

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

noexcept

Definition at line 171 of file helpers.cpp.

References ada_really_inline.

## Variable Documentation

## authority_delimiter

std::array<uint8_t, 256> ada::helpers::authority_delimiter

static constexpr

Initial value:
= []() consteval {
std::array<uint8_t, 256> result{};
for (uint8_t i : {'@', '/', '?'}) {
result[i] = 1;
}
return result;
}()
ada::result
tl::expected< result_type, ada::errors > result
Definition implementation.h:44

Definition at line 1040 of file helpers.cpp.

## authority_delimiter_special

std::array<uint8_t, 256> ada::helpers::authority_delimiter_special

static constexpr

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

Definition at line 1018 of file helpers.cpp.

## host_delimiters

std::array<uint8_t, 256> ada::helpers::host_delimiters

static constexpr

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

Definition at line 720 of file helpers.cpp.

Referenced by find_next_host_delimiter().

## special_host_delimiters

std::array<uint8_t, 256> ada::helpers::special_host_delimiters

static constexpr

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

Definition at line 458 of file helpers.cpp.

Referenced by find_next_host_delimiter_special().