mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
2000-03-08
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@635 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
4d215cd9d3
commit
035226e1fe
8 changed files with 111 additions and 27 deletions
8
string.c
8
string.c
|
@ -2483,6 +2483,13 @@ rb_str_scan(str, pat)
|
|||
return str;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rb_f_scan(self, pat)
|
||||
VALUE self, pat;
|
||||
{
|
||||
return rb_str_scan(uscore_get(), pat);
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rb_str_hex(str)
|
||||
VALUE str;
|
||||
|
@ -2755,6 +2762,7 @@ Init_String()
|
|||
rb_define_global_function("chomp!", rb_f_chomp_bang, -1);
|
||||
|
||||
rb_define_global_function("split", rb_f_split, -1);
|
||||
rb_define_global_function("scan", rb_f_scan, 1);
|
||||
|
||||
rb_define_method(rb_cString, "slice", rb_str_aref_m, -1);
|
||||
rb_define_method(rb_cString, "slice!", rb_str_slice_bang, -1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue