* string.c (rb_str_strlen): added. [ruby-dev:40028]

* include/ruby/intern.h (rb_str_strlen): declared.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26282 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
naruse 2010-01-11 07:58:26 +00:00
parent 6dcd551a4b
commit a3973ab1ba
3 changed files with 13 additions and 0 deletions

View File

@ -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.

View File

@ -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);

View File

@ -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