summaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2020-04-28 13:16:27 +0900
committerHiroshi Mimaki <[email protected]>2020-05-07 09:31:07 +0900
commitf5ee7df7f34774e398816cac6d7a9f093907b430 (patch)
treee74fe459e33c7c1461b485f0de28051592c2c536 /include
parente77e6e9d1237a6999a1e1bb6dcd2c7fa8e6187b4 (diff)
downloadmruby-f5ee7df7f34774e398816cac6d7a9f093907b430.tar.gz
mruby-f5ee7df7f34774e398816cac6d7a9f093907b430.zip
Rename (and expose) UTF-8 related functions; ref #4712
- mrb_utf8len() - returns the size of a UTF-8 char (in bytes) - mrb_utf8_strlen() - returns the length of a UTF-8 string (in char)
Diffstat (limited to 'include')
-rw-r--r--include/mruby/string.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/mruby/string.h b/include/mruby/string.h
index a518d9147..93c94ef5d 100644
--- a/include/mruby/string.h
+++ b/include/mruby/string.h
@@ -465,7 +465,8 @@ mrb_bool mrb_str_beg_len(mrb_int str_len, mrb_int *begp, mrb_int *lenp);
mrb_value mrb_str_byte_subseq(mrb_state *mrb, mrb_value str, mrb_int beg, mrb_int len);
#ifdef MRB_UTF8_STRING
-mrb_int mrb_utf8_len(const char *str, mrb_int byte_len);
+mrb_int mrb_utf8len(const char *str, const char *end);
+mrb_int mrb_utf8_strlen(const char *str, mrb_int byte_len);
#endif
MRB_END_DECL