Loading...
Searching...
No Matches
unicode.h
Go to the documentation of this file.
#ifndef ADA_UNICODE_H
#define ADA_UNICODE_H
#include "ada/common_defs.h"
#include "ada/ada_idna.h"
#include <string>
#include <string_view>
#include <optional>
namespace ada::unicode {
bool to_ascii(std::optional<std::string>& out, std::string_view plain,
size_t first_percent);
ada_really_inline bool has_tabs_or_newline(
std::string_view user_input) noexcept;
ada_really_inline constexpr bool is_forbidden_host_code_point(char c) noexcept;
ada_really_inline constexpr bool contains_forbidden_domain_code_point(
const char* input, size_t length) noexcept;
ada_really_inline constexpr uint8_t
contains_forbidden_domain_code_point_or_upper(const char* input,
size_t length) noexcept;
ada_really_inline constexpr bool is_forbidden_domain_code_point(
char c) noexcept;
ada_really_inline constexpr bool is_alnum_plus(char c) noexcept;
ada_really_inline constexpr bool is_ascii_hex_digit(char c) noexcept;
ada_really_inline constexpr bool is_ascii_digit(char c) noexcept;
ada_really_inline constexpr bool is_ascii(char32_t c) noexcept;
ada_really_inline constexpr bool is_c0_control_or_space(char c) noexcept;
ada_really_inline constexpr bool is_ascii_tab_or_newline(char c) noexcept;
ada_really_inline constexpr bool is_double_dot_path_segment(
std::string_view input) noexcept;
ada_really_inline constexpr bool is_single_dot_path_segment(
std::string_view input) noexcept;
ada_really_inline constexpr bool is_lowercase_hex(char c) noexcept;
ada_really_inline unsigned constexpr convert_hex_to_binary(char c) noexcept;
std::string percent_decode(std::string_view input, size_t first_percent);
std::string percent_encode(std::string_view input,
const uint8_t character_set[]);
std::string percent_encode(std::string_view input,
const uint8_t character_set[], size_t index);
template <bool append>
bool percent_encode(std::string_view input, const uint8_t character_set[],
std::string& out);
ada_really_inline size_t percent_encode_index(std::string_view input,
const uint8_t character_set[]);
constexpr bool to_lower_ascii(char* input, size_t length) noexcept;
} // namespace ada::unicode
#endif // ADA_UNICODE_H
ada_idna.h
common_defs.h
Cross-platform compiler macros and common definitions.
ada_really_inline
#define ada_really_inline
Definition common_defs.h:85
ada::unicode
Includes the declarations for unicode operations.
ada::unicode::percent_encode_index
ada_really_inline size_t percent_encode_index(const std::string_view input, const uint8_t character_set[])
Definition unicode-inl.h:19