9#include "../exception.hpp"
10#include "../assert.hpp"
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 unicode_bidi_class unicode_bidi_class_from_string(std::string_view str)
noexcept
65 using enum unicode_bidi_class;
69 }
else if (str ==
"R") {
71 }
else if (str ==
"AL") {
73 }
else if (str ==
"EN") {
75 }
else if (str ==
"ES") {
77 }
else if (str ==
"ET") {
79 }
else if (str ==
"AN") {
81 }
else if (str ==
"CS") {
83 }
else if (str ==
"NSM") {
85 }
else if (str ==
"BN") {
87 }
else if (str ==
"B") {
89 }
else if (str ==
"S") {
91 }
else if (str ==
"WS") {
93 }
else if (str ==
"ON") {
95 }
else if (str ==
"LRE") {
97 }
else if (str ==
"LRO") {
99 }
else if (str ==
"RLE") {
101 }
else if (str ==
"RLO") {
103 }
else if (str ==
"PDF") {
105 }
else if (str ==
"LRI") {
107 }
else if (str ==
"RLI") {
109 }
else if (str ==
"FSI") {
111 }
else if (str ==
"PDI") {