summaryrefslogtreecommitdiff
path: root/src/cairo-unicode.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cairo-unicode.c')
-rw-r--r--src/cairo-unicode.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/cairo-unicode.c b/src/cairo-unicode.c
index 88de3951..2908b490 100644
--- a/src/cairo-unicode.c
+++ b/src/cairo-unicode.c
@@ -116,6 +116,11 @@ static const char utf8_skip_data[256] = {
#define UTF8_NEXT_CHAR(p) ((p) + utf8_skip_data[*(unsigned char *)(p)])
+int
+ _cairo_utf8_get_char_bytes (const char *p) {
+ return utf8_skip_data[*(unsigned char *)(p)];
+}
+
/* Converts a sequence of bytes encoded as UTF-8 to a Unicode character.
* If @p does not point to a valid UTF-8 encoded character, results are
* undefined.