5#ifndef ADA_CHECKERS_INL_H
6#define ADA_CHECKERS_INL_H
16 constexpr bool is_little_endian = std::endian::native == std::endian::little;
33constexpr bool is_digit(
char x)
noexcept {
return (
x >=
'0') & (
x <=
'9'); }
35constexpr char to_lower(
char x)
noexcept {
return (
x | 0x20); }
42 return input.size() >= 2 &&
49 std::string_view
input)
noexcept {
54 std::string_view
input)
noexcept {
55 const char*
p =
input.data();
60 for (
int i = 0;
i < 4; ++
i) {
67 if (
c >=
'0' &&
c <=
'9') {
76 if (
c >=
'0' &&
c <=
'9') {
82 if (
c >=
'0' &&
c <=
'9') {
91 ipv4 = (ipv4 << 8) |
val;
94 if (
p ==
pend || *
p !=
'.') {
102 if (
p ==
pend - 1 && *
p ==
'.') {
Declarations for URL specific checkers used within Ada.
#define ada_really_inline
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
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
ada_warn_unused ada::result< result_type > parse(std::string_view input, const result_type *base_url=nullptr)