aboutsummaryrefslogtreecommitdiff
path: root/include/unicode
diff options
context:
space:
mode:
Diffstat (limited to 'include/unicode')
-rw-r--r--include/unicode/string.h21
1 files changed, 9 insertions, 12 deletions
diff --git a/include/unicode/string.h b/include/unicode/string.h
index 7da4385..e3d93ad 100644
--- a/include/unicode/string.h
+++ b/include/unicode/string.h
@@ -7,8 +7,6 @@
#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 {
@@ -30,20 +28,19 @@ size_t u8gnext(struct u8view *, struct u8view *);
size_t u8wnext(struct u8view *, struct u8view *);
size_t u8wnext_human(struct u8view *, struct u8view *);
-[[mlib_warn_trunc]]
-size_t u8casefold(char8_t *restrict, size_t, struct u8view, enum caseflags);
-[[mlib_warn_trunc]]
-size_t u8lower(char8_t *restrict, size_t, struct u8view, enum caseflags);
-[[mlib_warn_trunc]]
-size_t u8title(char8_t *restrict, size_t, struct u8view, enum caseflags);
-[[nodiscard]]
-char8_t *u8upper(size_t *, struct u8view, enum caseflags, alloc_fn, void *);
+[[nodiscard]] char8_t *u8casefold(size_t *, struct u8view, enum caseflags,
+ alloc_fn, void *);
+[[nodiscard]] char8_t *u8lower(size_t *, struct u8view, enum caseflags,
+ alloc_fn, void *);
+[[nodiscard]] char8_t *u8title(size_t *, struct u8view, enum caseflags,
+ alloc_fn, void *);
+[[nodiscard]] char8_t *u8upper(size_t *, struct u8view, enum caseflags,
+ alloc_fn, void *);
+constexpr double U8CASEFOLD_SCALE = 3;
constexpr double U8LOWER_SCALE = 1.5;
constexpr double U8LOWER_SCALE_LT = 3;
constexpr double U8TITLE_SCALE = 3;
constexpr double U8UPPER_SCALE = 3;
-#undef mlib_warn_trunc
-
#endif /* !MLIB_UNICODE_STRING_H */