9#include "../strings.hpp"
16 using char_type = hi::grapheme;
17 using int_type = hi::grapheme::value_type;
21 using comparison_category = std::strong_ordering;
23 static constexpr void assign(char_type &r, char_type
const &a)
noexcept
36 [[nodiscard]]
static constexpr bool eq(char_type a, char_type b)
noexcept
41 [[nodiscard]]
static constexpr bool lt(char_type a, char_type b)
noexcept
46 static constexpr char_type *
move(char_type *dst, char_type
const *src,
std::size_t count)
noexcept
54 dst[i - 1] = src[i - 1];
60 static constexpr char_type *
copy(char_type *dst, char_type
const *src,
std::size_t count)
noexcept
72 return s1[i] < s2[i] ? -1 : 1;
81 while (not s[i].empty()) {
87 static constexpr char_type
const *
find(
const char_type *p,
std::size_t count,
const char_type &ch)
noexcept
97 static constexpr char_type
to_char_type(int_type c)
noexcept
104 static constexpr int_type
to_int_type(char_type c)
noexcept
109 static constexpr bool eq_int_type(int_type c1, int_type c2)
noexcept
114 static constexpr int_type
eof()
noexcept
120 static constexpr int_type
not_eof(int_type e)
noexcept
123 return e ==
eof() ? 0xfffd : e;
127namespace hi::inline
v1 {
130using gstring_view = std::basic_string_view<grapheme>;
133using gstring = std::pmr::basic_string<grapheme>;
142[[nodiscard]]
gstring to_gstring(std::u32string_view rhs,
char32_t new_line_char = U
'\u2029')
noexcept;
150[[nodiscard]]
inline gstring to_gstring(std::string_view rhs,
char32_t new_line_char = U
'\u2029')
noexcept
152 return to_gstring(to_u32string(rhs), new_line_char);
163 return to_gstring(std::string_view{rhs}, new_line_char);
166[[nodiscard]]
inline std::string to_string(gstring_view rhs)
noexcept
200 for (
hilet c : rhs) {
Utilities used by the HikoGUI library itself.
#define hilet
Invariant should be the default for variables.
Definition utility.hpp:23
DOXYGEN BUG.
Definition algorithm.hpp:15
gstring to_gstring(std::u32string_view rhs, char32_t new_line_char=U'\u2029') noexcept
Convert a UTF-32 string to a grapheme-string.
The HikoGUI namespace.
Definition ascii.hpp:19
T to_char_type(T... args)