Ada
4.1.1
Fast spec-compliant URL parser
Toggle main menu visibility
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
21
namespace
ada::checkers
{
22
29
constexpr
char
to_lower
(
char
x)
noexcept
;
30
38
constexpr
bool
is_alpha
(
char
x)
noexcept
;
39
45
constexpr
bool
is_digit
(
char
x)
noexcept
;
46
59
inline
constexpr
bool
is_windows_drive_letter
(std::string_view input)
noexcept
;
60
66
inline
constexpr
bool
is_normalized_windows_drive_letter
(
67
std::string_view input)
noexcept
;
68
75
ada_really_inline
constexpr
bool
is_ipv4(std::string_view view)
noexcept
;
76
87
ada_really_inline
constexpr
bool
last_label_may_be_a_number
(
88
std::string_view view)
noexcept
;
89
97
ada_really_inline
constexpr
uint8_t path_signature(
98
std::string_view input)
noexcept
;
99
111
ada_really_inline
constexpr
bool
verify_dns_length(
112
std::string_view input)
noexcept
;
113
122
ada_really_inline
uint64_t
try_parse_ipv4_fast
(std::string_view input)
noexcept
;
123
128
constexpr
uint64_t
ipv4_fast_fail
= uint64_t(1) << 32;
129
130
}
// namespace ada::checkers
131
132
#endif
// ADA_CHECKERS_H
common_defs.h
Cross-platform compiler macros and common definitions.
ada_really_inline
#define ada_really_inline
Definition
common_defs.h:85
ada::checkers
Includes the definitions for validation functions.
Definition
checkers-inl.h:19
ada::checkers::last_label_may_be_a_number
constexpr bool last_label_may_be_a_number(std::string_view view) noexcept
Definition
checkers-inl.h:29
ada::checkers::is_normalized_windows_drive_letter
constexpr bool is_normalized_windows_drive_letter(std::string_view input) noexcept
Definition
checkers-inl.h:67
ada::checkers::is_windows_drive_letter
constexpr bool is_windows_drive_letter(std::string_view input) noexcept
Definition
checkers-inl.h:60
ada::checkers::to_lower
constexpr char to_lower(char x) noexcept
Definition
checkers-inl.h:54
ada::checkers::ipv4_fast_fail
constexpr uint64_t ipv4_fast_fail
Definition
checkers.h:128
ada::checkers::try_parse_ipv4_fast
ada_really_inline uint64_t try_parse_ipv4_fast(std::string_view input) noexcept
Definition
checkers-inl.h:235
ada::checkers::is_alpha
constexpr bool is_alpha(char x) noexcept
Definition
checkers-inl.h:56
ada::checkers::is_digit
constexpr bool is_digit(char x) noexcept
Definition
checkers-inl.h:21