Ada
3.4.3
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 <cstring>
11
#include <string_view>
12
20
namespace
ada::checkers
{
21
28
constexpr
char
to_lower
(
char
x)
noexcept
;
29
37
constexpr
bool
is_alpha
(
char
x)
noexcept
;
38
46
constexpr
bool
has_hex_prefix_unsafe
(std::string_view input);
51
constexpr
bool
has_hex_prefix
(std::string_view input);
52
58
constexpr
bool
is_digit
(
char
x)
noexcept
;
59
72
inline
constexpr
bool
is_windows_drive_letter
(std::string_view input)
noexcept
;
73
79
inline
constexpr
bool
is_normalized_windows_drive_letter
(
80
std::string_view input)
noexcept
;
81
88
ada_really_inline
constexpr
bool
is_ipv4(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
constexpr
uint64_t
try_parse_ipv4_fast
(
123
std::string_view input)
noexcept
;
124
129
constexpr
uint64_t
ipv4_fast_fail
= uint64_t(1) << 32;
130
131
}
// namespace ada::checkers
132
133
#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:12
ada::checkers::has_hex_prefix_unsafe
constexpr bool has_hex_prefix_unsafe(std::string_view input)
Definition
checkers-inl.h:14
ada::checkers::has_hex_prefix
constexpr bool has_hex_prefix(std::string_view input)
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:48
ada::checkers::is_windows_drive_letter
constexpr bool is_windows_drive_letter(std::string_view input) noexcept
Definition
checkers-inl.h:41
ada::checkers::to_lower
constexpr char to_lower(char x) noexcept
Definition
checkers-inl.h:35
ada::checkers::ipv4_fast_fail
constexpr uint64_t ipv4_fast_fail
Definition
checkers.h:129
ada::checkers::is_alpha
constexpr bool is_alpha(char x) noexcept
Definition
checkers-inl.h:37
ada::checkers::is_digit
constexpr bool is_digit(char x) noexcept
Definition
checkers-inl.h:33
ada::checkers::try_parse_ipv4_fast
ada_really_inline constexpr uint64_t try_parse_ipv4_fast(std::string_view input) noexcept
Definition
checkers-inl.h:53