9#include "../utility/module.hpp"
11namespace hi::inline
v1 {
44[[nodiscard]]
constexpr bool is_isolate_starter(unicode_bidi_class
const &rhs)
noexcept
46 using enum unicode_bidi_class;
47 return rhs == LRI || rhs == RLI || rhs == FSI;
50[[nodiscard]]
constexpr bool is_isolate_formatter(unicode_bidi_class
const &rhs)
noexcept
53 return is_isolate_starter(rhs) || rhs ==
PDI;
56[[nodiscard]]
constexpr bool is_NI(unicode_bidi_class
const &rhs)
noexcept
59 return rhs == B || rhs == S || rhs ==
WS || rhs ==
ON || rhs ==
FSI || rhs ==
LRI || rhs ==
RLI || rhs ==
PDI;
62[[nodiscard]]
constexpr bool is_control(unicode_bidi_class
const &rhs)
noexcept
65 return rhs ==
RLE or rhs ==
LRE or rhs ==
RLO or rhs ==
LRO or rhs ==
PDF or rhs ==
BN;
68[[nodiscard]]
constexpr unicode_bidi_class unicode_bidi_class_from_string(std::string_view str)
noexcept
74 }
else if (str ==
"R") {
76 }
else if (str ==
"AL") {
78 }
else if (str ==
"EN") {
80 }
else if (str ==
"ES") {
82 }
else if (str ==
"ET") {
84 }
else if (str ==
"AN") {
86 }
else if (str ==
"CS") {
88 }
else if (str ==
"NSM") {
90 }
else if (str ==
"BN") {
92 }
else if (str ==
"B") {
94 }
else if (str ==
"S") {
96 }
else if (str ==
"WS") {
98 }
else if (str ==
"ON") {
100 }
else if (str ==
"LRE") {
102 }
else if (str ==
"LRO") {
104 }
else if (str ==
"RLE") {
106 }
else if (str ==
"RLO") {
108 }
else if (str ==
"PDF") {
110 }
else if (str ==
"LRI") {
112 }
else if (str ==
"RLI") {
114 }
else if (str ==
"FSI") {
116 }
else if (str ==
"PDI") {
#define hi_no_default(...)
This part of the code should not be reachable, unless a programming bug.
Definition assert.hpp:264
DOXYGEN BUG.
Definition algorithm.hpp:13
unicode_bidi_class
Bidirectional class Unicode Standard Annex #9: https://unicode.org/reports/tr9/.
Definition unicode_bidi_class.hpp:16
@ LRO
Left-to-Right Override.
@ ES
European Number Separator.
@ FSI
First Strong Isolate.
@ RLE
Right-to-Left Embedding.
@ LRI
Left-to-Right Isolate.
@ CS
Common Number Separator.
@ PDI
Pop Directional Isolate.
@ ET
European Number Terminator.
@ RLI
Right-to-Left Isolate.
@ PDF
Pop Directional Format.
@ RLO
Right-to-left Override.
@ AL
Right-to-Left Arabic.
@ LRE
Left-to-Right Embedding.