diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | include/ruby/intern.h | 1 | ||||
-rw-r--r-- | string.c | 6 |
3 files changed, 13 insertions, 0 deletions
@@ -1,3 +1,9 @@ +Mon Jan 11 16:52:05 2010 NARUSE, Yui <naruse@ruby-lang.org> + + * string.c (rb_str_strlen): added. [ruby-dev:40028] + + * include/ruby/intern.h (rb_str_strlen): declared. + Mon Jan 11 13:30:35 2010 Nobuyoshi Nakada <nobu@ruby-lang.org> * lib/webrick/accesslog.rb (WEBrick::AccessLog#format): fixed typo. diff --git a/include/ruby/intern.h b/include/ruby/intern.h index 14e23b857d..116afa520b 100644 --- a/include/ruby/intern.h +++ b/include/ruby/intern.h @@ -662,6 +662,7 @@ VALUE rb_str_associated(VALUE); void rb_str_setter(VALUE, ID, VALUE*); VALUE rb_str_intern(VALUE); VALUE rb_sym_to_s(VALUE); +long rb_str_strlen(VALUE); VALUE rb_str_length(VALUE); long rb_str_offset(VALUE, long); size_t rb_str_capacity(VALUE); @@ -1079,6 +1079,12 @@ str_strlen(VALUE str, rb_encoding *enc) return n; } +long +rb_str_strlen(VALUE str) +{ + return str_strlen(str, STR_ENC_GET(str)); +} + /* * call-seq: * str.length => integer |