Ada 3.4.0
Fast spec-compliant URL parser
Loading...
Searching...
No Matches
checkers.h
Go to the documentation of this file.
1
5#ifndef ADA_CHECKERS_H
6#define ADA_CHECKERS_H
7
8#include "ada/common_defs.h"
9
10#include <cstring>
11#include <string_view>
12
20namespace ada::checkers {
21
28constexpr char to_lower(char x) noexcept;
29
37constexpr bool is_alpha(char x) noexcept;
38
46constexpr bool has_hex_prefix_unsafe(std::string_view input);
51constexpr bool has_hex_prefix(std::string_view input);
52
58constexpr bool is_digit(char x) noexcept;
59
72inline constexpr bool is_windows_drive_letter(std::string_view input) noexcept;
73
79inline constexpr bool is_normalized_windows_drive_letter(
80 std::string_view input) noexcept;
81
88ada_really_inline constexpr bool is_ipv4(std::string_view view) noexcept;
89
97ada_really_inline constexpr uint8_t path_signature(
98 std::string_view input) noexcept;
99
111ada_really_inline constexpr bool verify_dns_length(
112 std::string_view input) noexcept;
113
122ada_really_inline constexpr uint64_t try_parse_ipv4_fast(
123 std::string_view input) noexcept;
124
129constexpr uint64_t ipv4_fast_fail = uint64_t(1) << 32;
130
131} // namespace ada::checkers
132
133#endif // ADA_CHECKERS_H
Cross-platform compiler macros and common definitions.
#define ada_really_inline
Definition common_defs.h:85
Includes the definitions for validation functions.
constexpr bool has_hex_prefix_unsafe(std::string_view input)
constexpr bool has_hex_prefix(std::string_view input)
constexpr bool is_normalized_windows_drive_letter(std::string_view input) noexcept
constexpr bool is_windows_drive_letter(std::string_view input) noexcept
constexpr char to_lower(char x) noexcept
constexpr uint64_t ipv4_fast_fail
Definition checkers.h:129
constexpr bool is_alpha(char x) noexcept
constexpr bool is_digit(char x) noexcept
ada_really_inline constexpr uint64_t try_parse_ipv4_fast(std::string_view input) noexcept