mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Merge pull request #2353 from suzukaze/refactor-string-utf8
Refactor mrb_utf8_strlen() in mruby-string-utf8
This commit is contained in:
@@ -127,9 +127,7 @@ mrb_utf8_strlen(mrb_value str, mrb_int len)
|
||||
static mrb_value
|
||||
mrb_str_size(mrb_state *mrb, mrb_value str)
|
||||
{
|
||||
mrb_int size = mrb_utf8_strlen(str, -1);
|
||||
|
||||
return mrb_fixnum_value(size);
|
||||
return mrb_fixnum_value(mrb_utf8_strlen(str, -1));
|
||||
}
|
||||
|
||||
#define RSTRING_LEN_UTF8(s) mrb_utf8_strlen(s, -1)
|
||||
|
||||
Reference in New Issue
Block a user