8#include "../utility/module.hpp"
9#include "../strings.hpp"
15 using char_type = hi::grapheme;
16 using int_type = hi::grapheme::value_type;
20 using comparison_category = std::strong_ordering;
22 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
57 dst[i - 1] = src[i - 1];
63 static constexpr char_type *
copy(char_type *dst, char_type
const *src,
std::size_t count)
noexcept
81 return s1[i] < s2[i] ? -1 : 1;
92 while (not s[i].empty()) {
98 static constexpr char_type
const *
find(
const char_type *p,
std::size_t count,
const char_type &ch)
noexcept
110 static constexpr char_type
to_char_type(int_type c)
noexcept
117 static constexpr int_type
to_int_type(char_type c)
noexcept
122 static constexpr bool eq_int_type(int_type c1, int_type c2)
noexcept
127 static constexpr int_type
eof()
noexcept
133 static constexpr int_type
not_eof(int_type e)
noexcept
136 return e ==
eof() ? 0xfffd : e;
140namespace hi::inline
v1 {
143using gstring_view = std::basic_string_view<grapheme>;
146using gstring = std::pmr::basic_string<grapheme>;
155[[nodiscard]]
gstring to_gstring(std::u32string_view rhs,
char32_t new_line_char = U
'\u2029')
noexcept;
163[[nodiscard]]
inline gstring to_gstring(std::string_view rhs,
char32_t new_line_char = U
'\u2029')
noexcept
176 return to_gstring(std::string_view{rhs}, new_line_char);
213 for (
hilet c : rhs) {
#define hi_axiom_not_null(expression,...)
Assert if an expression is not nullptr.
Definition assert.hpp:257
#define hilet
Invariant should be the default for variables.
Definition utility.hpp:23
constexpr std::string to_string(std::u32string_view rhs) noexcept
Conversion from UTF-32 to UTF-8.
Definition to_string.hpp:215
constexpr std::u32string to_u32string(std::u32string_view rhs) noexcept
Identity conversion from UTF-32 to UTF-32.
Definition to_string.hpp:23
DOXYGEN BUG.
Definition algorithm.hpp:13
gstring to_gstring(std::u32string_view rhs, char32_t new_line_char=U'\u2029') noexcept
Convert a UTF-32 string to a grapheme-string.
geometry/margins.hpp
Definition cache.hpp:11
T to_char_type(T... args)