diff options
Diffstat (limited to 'include/unicode')
-rw-r--r-- | include/unicode/string.h | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/include/unicode/string.h b/include/unicode/string.h index 887a216..cb19821 100644 --- a/include/unicode/string.h +++ b/include/unicode/string.h @@ -6,6 +6,8 @@ #include "_charN_t.h" #include "_u8view.h" +#define mlib_warn_trunc nodiscard("don’t forget to check for truncation") + /* clang-format off */ enum [[clang::flag_enum]] caseflags { @@ -25,18 +27,20 @@ size_t u8gnext(struct u8view *, const char8_t **, size_t *); size_t u8wnext(struct u8view *, const char8_t **, size_t *); size_t u8wnext_human(struct u8view *, const char8_t **, size_t *); -#define mlib_warn_trunc nodiscard("don’t forget to check for truncation") [[mlib_warn_trunc]] size_t u8casefold(char8_t *restrict, size_t, const char8_t *, size_t, enum caseflags); [[mlib_warn_trunc]] size_t u8lower(char8_t *restrict, size_t, const char8_t *, size_t, enum caseflags); +[[mlib_warn_trunc]] size_t u8title(char8_t *restrict, size_t, const char8_t *, + size_t, enum caseflags); [[mlib_warn_trunc]] size_t u8upper(char8_t *restrict, size_t, const char8_t *, size_t, enum caseflags); -#undef mlib_warn_trunc -constexpr double U8LOWER_SCALE = 1.5; +constexpr double U8LOWER_SCALE = 1.5; constexpr double U8LOWER_SCALE_LT = 3; -constexpr double U8TITLE_SCALE = 3; -constexpr double U8UPPER_SCALE = 3; +constexpr double U8TITLE_SCALE = 3; +constexpr double U8UPPER_SCALE = 3; + +#undef mlib_warn_trunc #endif /* !MLIB_UNICODE_STRING_H */ |