From c3f21572ed18b9319aeba0fc5caf4a6394fd3905 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Sun, 17 Mar 2013 22:01:42 +0000 Subject: Add function to get the byte length of n characters in a utf8 string. --- utils/utf8.h | 1 + 1 file changed, 1 insertion(+) (limited to 'utils/utf8.h') diff --git a/utils/utf8.h b/utils/utf8.h index 26234f6c0..eb043c227 100644 --- a/utils/utf8.h +++ b/utils/utf8.h @@ -37,6 +37,7 @@ size_t utf8_from_ucs4(uint32_t c, char *s); size_t utf8_length(const char *s); size_t utf8_bounded_length(const char *s, size_t l); +size_t utf8_bounded_byte_length(const char *s, size_t l, size_t c); size_t utf8_char_byte_length(const char *s); -- cgit v1.2.3