[macruby-changes] [4813] MacRuby/trunk/string.c

source_changes at macosforge.org source_changes at macosforge.org
Sat Oct 23 00:17:57 PDT 2010


Revision: 4813
          http://trac.macosforge.org/projects/ruby/changeset/4813
Author:   watson1978 at gmail.com
Date:     2010-10-23 00:17:53 -0700 (Sat, 23 Oct 2010)
Log Message:
-----------
added a rb_str_split() of MRI API.

Modified Paths:
--------------
    MacRuby/trunk/string.c

Modified: MacRuby/trunk/string.c
===================================================================
--- MacRuby/trunk/string.c	2010-10-22 01:51:53 UTC (rev 4812)
+++ MacRuby/trunk/string.c	2010-10-23 07:17:53 UTC (rev 4813)
@@ -3315,6 +3315,16 @@
     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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20101023/f921a2a5/attachment.html>


More information about the macruby-changes mailing list