Skip to content

Commit ed02856

Browse files
committed
Adds String.copyValueOf
1 parent 0be7fed commit ed02856

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

sources/net.sf.j2s.java.core/srcjs/js/j2sClazz.js

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
// Google closure compiler cannot handle Clazz.new or Clazz.super
99

1010

11+
// BH 2/13/2018 6:24:44 AM adds String.copyValueOf (two forms)
1112
// BH 2/7/2018 7:47:07 PM adds System.out.flush and System.err.flush
1213
// BH 2/1/2018 12:14:20 AM fix for new int[128][] not nulls
1314
// BH 1/9/2018 8:40:52 AM fully running SwingJS2; adds String.isEmpty()
@@ -3638,8 +3639,6 @@ return Clazz.array(Byte.TYPE, -1, arrs);
36383639
sp.contains$S = function(a) {return this.indexOf(a) >= 0} // bh added
36393640
sp.compareTo$S = sp.compareTo$TT = function(a){return this > a ? 1 : this < a ? -1 : 0} // bh added
36403641

3641-
3642-
36433642
sp.toCharArray=function(){
36443643
var result=new Array(this.length);
36453644
for(var i=0;i<this.length;i++){
@@ -3905,6 +3904,16 @@ default:
39053904

39063905
})(Clazz._Encoding);
39073906

3907+
String.copyValueOf$CA$I$I = function(data,offset,count) {
3908+
var s = "";
3909+
for (var pt = offset, n = offset+count;pt < n;pt++)s += data[pt];
3910+
return s;
3911+
}
3912+
String.copyValueOf$CA = function(data) {
3913+
return sp.copyValueOf$CA$I$I(data, 0, data.length);
3914+
}
3915+
3916+
39083917
C$=Clazz.newClass(java.lang,"Character",function(){
39093918
if (typeof arguments[0] != "object")this.c$(arguments[0]);
39103919
},null,[java.io.Serializable,Comparable]);

0 commit comments

Comments
 (0)