diff options
Diffstat (limited to 'include/unicode/string.h')
-rw-r--r-- | include/unicode/string.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/unicode/string.h b/include/unicode/string.h index 975e4eb..ed082a1 100644 --- a/include/unicode/string.h +++ b/include/unicode/string.h @@ -30,6 +30,7 @@ enum normform { /* clang-format on */ +[[nodiscard]] size_t u8wdth(struct u8view); [[nodiscard]] size_t u8gcnt(struct u8view); [[nodiscard]] size_t u8wcnt(struct u8view); [[nodiscard]] size_t u8wcnt_human(struct u8view); @@ -48,6 +49,7 @@ size_t u8wnext_human(struct u8view *, struct u8view *); enum normform); /* Encoding-generic macros */ +#define ucswdth(sv) _Generic((sv), struct u8view: u8wdth)((sv)) #define ucsgcnt(sv) _Generic((sv), struct u8view: u8gcnt)((sv)) #define ucswcnt(sv) _Generic((sv), struct u8view: u8wcnt)((sv)) #define ucswcnt_human(sv) _Generic((sv), struct u8view: u8wcnt_human)((sv)) |