Browse files

added a rb_str_split() of MRI API.

git-svn-id: http://svn.macosforge.org/repository/ruby/MacRuby/trunk@4813 23306eb0-4c56-4727-a40e-e92c0eb68959
  • Loading branch information...
1 parent 818fcaf commit dd4184ad4f8e01a4ffe40282bc21669d2a235bd6 @Watson1978 Watson1978 committed Oct 23, 2010
Showing with 10 additions and 0 deletions.
  1. +10 −0 string.c
View
10 string.c
@@ -3315,6 +3315,16 @@ rstr_split(VALUE str, SEL sel, int argc, VALUE *argv)
return result;
}
+VALUE
+rb_str_split(VALUE str, const char *sep0)
+{
+ VALUE sep;
+
+ StringValue(str);
+ sep = rb_str_new2(sep0);
+ return rstr_split(str, 0, 1, &sep);
+}
+
/*
* call-seq:
* str.to_i(base=10) => integer

0 comments on commit dd4184a

Please sign in to comment.