diff options
Diffstat (limited to 'src/basic/utf8.c')
-rw-r--r-- | src/basic/utf8.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/basic/utf8.c b/src/basic/utf8.c index 0d904e53af..2a9da59881 100644 --- a/src/basic/utf8.c +++ b/src/basic/utf8.c @@ -504,6 +504,10 @@ size_t char16_strlen(const char16_t *s) { return n; } +size_t char16_strsize(const char16_t *s) { + return s ? (char16_strlen(s) + 1) * sizeof(*s) : 0; +} + /* expected size used to encode one unicode char */ static int utf8_unichar_to_encoded_len(char32_t unichar) { |