9#include "../exception.hpp"
10#include "../assert.hpp"
12namespace hi::inline v1 {
17enum class unicode_bidi_class : uint8_t {
45[[nodiscard]]
constexpr bool is_isolate_starter(unicode_bidi_class
const &rhs)
noexcept
47 using enum unicode_bidi_class;
48 return rhs == LRI || rhs == RLI || rhs == FSI;
51[[nodiscard]]
constexpr bool is_isolate_formatter(unicode_bidi_class
const &rhs)
noexcept
53 using enum unicode_bidi_class;
54 return is_isolate_starter(rhs) || rhs == PDI;
57[[nodiscard]]
constexpr bool is_NI(unicode_bidi_class
const &rhs)
noexcept
59 using enum unicode_bidi_class;
60 return rhs == B || rhs == S || rhs == WS || rhs == ON || rhs == FSI || rhs == LRI || rhs == RLI || rhs == PDI;
63[[nodiscard]]
constexpr bool is_control(unicode_bidi_class
const &rhs)
noexcept
65 using enum unicode_bidi_class;
66 return rhs == RLE or rhs == LRE or rhs == RLO or rhs == LRO or rhs == PDF or rhs == BN;
69[[nodiscard]]
constexpr unicode_bidi_class unicode_bidi_class_from_string(std::string_view str)
noexcept
71 using enum unicode_bidi_class;
75 }
else if (str ==
"R") {
77 }
else if (str ==
"AL") {
79 }
else if (str ==
"EN") {
81 }
else if (str ==
"ES") {
83 }
else if (str ==
"ET") {
85 }
else if (str ==
"AN") {
87 }
else if (str ==
"CS") {
89 }
else if (str ==
"NSM") {
91 }
else if (str ==
"BN") {
93 }
else if (str ==
"B") {
95 }
else if (str ==
"S") {
97 }
else if (str ==
"WS") {
99 }
else if (str ==
"ON") {
101 }
else if (str ==
"LRE") {
103 }
else if (str ==
"LRO") {
105 }
else if (str ==
"RLE") {
107 }
else if (str ==
"RLO") {
109 }
else if (str ==
"PDF") {
111 }
else if (str ==
"LRI") {
113 }
else if (str ==
"RLI") {
115 }
else if (str ==
"FSI") {
117 }
else if (str ==
"PDI") {