Ada 2.7.8
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 <string_view>
11#include <cstring>
12
20namespace ada::checkers {
21
28constexpr char to_lower(char x) noexcept;
29
37constexpr bool is_alpha(char x) noexcept;
38
46inline bool has_hex_prefix_unsafe(std::string_view input);
51inline 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
86ada_really_inline bool begins_with(std::string_view view,
87 std::string_view prefix);
88
95ada_really_inline ada_constexpr bool is_ipv4(std::string_view view) noexcept;
96
104ada_really_inline constexpr uint8_t path_signature(
105 std::string_view input) noexcept;
106
118ada_really_inline constexpr bool verify_dns_length(
119 std::string_view input) noexcept;
120
121} // namespace ada::checkers
122
123#endif // ADA_CHECKERS_H
Common definitions for cross-platform compiler support.
#define ada_constexpr
#define ada_really_inline
Definition common_defs.h:84
Includes the definitions for validation functions.
bool has_hex_prefix_unsafe(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
bool has_hex_prefix(std::string_view input)
constexpr bool is_alpha(char x) noexcept
constexpr bool is_digit(char x) noexcept
ada_really_inline bool begins_with(std::string_view view, std::string_view prefix)
ada_warn_unused ada::result< result_type > parse(std::string_view input, const result_type *base_url=nullptr)