diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2020-04-28 13:16:27 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2020-04-28 13:57:46 +0900 |
| commit | a395f8e2c829706eb7c9e0dccaab077f189ddb6e (patch) | |
| tree | ebc497b9a5f21dd017a5d46b335627ad475898db /include | |
| parent | 3ce459f23a16a63973e1e0cfea299fb1ec108909 (diff) | |
| download | mruby-a395f8e2c829706eb7c9e0dccaab077f189ddb6e.tar.gz mruby-a395f8e2c829706eb7c9e0dccaab077f189ddb6e.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.h | 3 |
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 |
