utf8_width(): allow non NUL-terminated input
The original interface assumed that the input string is always terminated with a NUL, but that wasn't too useful. Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
4
utf8.h
4
utf8.h
@ -3,8 +3,8 @@
|
||||
|
||||
typedef unsigned int ucs_char_t; /* assuming 32bit int */
|
||||
|
||||
ucs_char_t pick_one_utf8_char(const char **start);
|
||||
int utf8_width(const char **start);
|
||||
ucs_char_t pick_one_utf8_char(const char **start, size_t *remainder_p);
|
||||
int utf8_width(const char **start, size_t *remainder_p);
|
||||
int is_utf8(const char *text);
|
||||
int is_encoding_utf8(const char *name);
|
||||
|
||||
|
Reference in New Issue
Block a user