10#ifndef REAL_UNICODE_PROPS_HPP
11#define REAL_UNICODE_PROPS_HPP
902 std::size_t hi {ranges.size()};
904 const std::size_t mid {lo + ((hi - lo) / 2)};
905 if (ranges[mid].hi < cp) {
912 return lo < ranges.size() && cp >= ranges[lo].
lo && cp <= ranges[lo].hi;
constexpr bool cp_in_ranges(std::span< const code_range > ranges, char32_t cp)
Binary-searches a sorted, non-overlapping range table for cp. Returns a bool (not a pointer into the ...
constexpr std::size_t digit_ranges_size
constexpr bool is_space_cp(char32_t cp)
constexpr std::size_t space_ranges_size
constexpr std::size_t word_ranges_size
constexpr code_range word_ranges[]
Code-point ranges matched by \w (771 ranges, 142940 code points).
constexpr code_range space_ranges[]
Code-point ranges matched by \s (10 ranges, 29 code points).
constexpr bool is_word_cp(char32_t cp)
Whether cp is a Unicode word / digit / whitespace code point (== re \w/\d/\s).
constexpr const char * unicode_props_unidata_version
The Unicode data version these tables were generated from (16.0.0).
constexpr code_range digit_ranges[]
Code-point ranges matched by \d (71 ranges, 760 code points).
constexpr bool is_digit_cp(char32_t cp)
Compiled form of a pattern and the public flags / error types.
An inclusive code-point range [lo, hi]. Shared by character classes (ast.hpp) and the generated Unico...
std::uint32_t lo
First code point (inclusive).
REAL's version macros and the C++20 language-standard guard.