summaryrefslogtreecommitdiff
path: root/FL/fl_utf8.h
diff options
context:
space:
mode:
authorMatthias Melcher <github@matthiasm.com>2023-01-20 16:13:00 +0100
committerMatthias Melcher <github@matthiasm.com>2023-01-20 16:13:00 +0100
commit2c595e8ddec759fb94bf1b06d21dada3a1b70978 (patch)
tree35aaa548a6363327492796769b5b20cca729fa47 /FL/fl_utf8.h
parentcd5301ac37cf05440ae3cff03dc3fdcea15af68d (diff)
STR 2822: function to count bytes in a UTF-8 string
Diffstat (limited to 'FL/fl_utf8.h')
-rw-r--r--FL/fl_utf8.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/FL/fl_utf8.h b/FL/fl_utf8.h
index 7a7489b38..41e59c648 100644
--- a/FL/fl_utf8.h
+++ b/FL/fl_utf8.h
@@ -56,6 +56,9 @@ FL_EXPORT int fl_utf8len(char c);
/* OD: returns the byte length of the first UTF-8 char sequence (returns +1 if not valid) */
FL_EXPORT int fl_utf8len1(char c);
+/* OD: returns the byte length of a UTF-8 text */
+FL_EXPORT int fl_utf8strlen(const char *text, int len=-1);
+
/* OD: returns the number of Unicode chars in the UTF-8 string */
FL_EXPORT int fl_utf_nb_char(const unsigned char *buf, int len);