Ada 4.1.1
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 <cstdint>
11#include <cstring>
12#include <string_view>
13
21namespace ada::checkers {
22
29constexpr char to_lower(char x) noexcept;
30
38constexpr bool is_alpha(char x) noexcept;
39
45constexpr bool is_digit(char x) noexcept;
46
59inline constexpr bool is_windows_drive_letter(std::string_view input) noexcept;
60
66inline constexpr bool is_normalized_windows_drive_letter(
67 std::string_view input) noexcept;
68
75ada_really_inline constexpr bool is_ipv4(std::string_view view) noexcept;
76
88 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 uint64_t try_parse_ipv4_fast(std::string_view input) noexcept;
123
128constexpr uint64_t ipv4_fast_fail = uint64_t(1) << 32;
129
130} // namespace ada::checkers
131
132#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 last_label_may_be_a_number(std::string_view view) noexcept
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:128
ada_really_inline uint64_t try_parse_ipv4_fast(std::string_view input) noexcept
constexpr bool is_alpha(char x) noexcept
constexpr bool is_digit(char x) noexcept