Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
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...
commit dd4184ad4f8e01a4ffe40282bc21669d2a235bd6 1 parent 818fcaf
@Watson1978 Watson1978 authored
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
Please sign in to comment.
Something went wrong with that request. Please try again.