fixes and additions to new js api
[org.ibex.core.git] / src / org / ibex / js / JSRegexp.java
index cb2c89d..e083902 100644 (file)
@@ -283,7 +283,8 @@ public class JSRegexp extends JS {
     }
                     
     
-    public static JS stringSplit(String s, JS arg0, JS arg1, int nargs) throws JSExn {
+    public static JS stringSplit(JS s_, JS arg0, JS arg1, int nargs) throws JSExn {
+        String s = JS.toString(s_);
         int limit = nargs < 2 ? Integer.MAX_VALUE : JS.toInt(arg1);
         if(limit < 0) limit = Integer.MAX_VALUE;
         if(limit == 0) return new JSArray();