Skip to content

Commit 0ee0717

Browse files
hansonrhansonr
authored andcommitted
missing String.join() and Float.isNaN()
1 parent 2ef1315 commit 0ee0717

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

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

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99

1010
// TODO: still a lot of references to window[...]
1111

12+
// BH 1/29/2019 adds String.join$CharSequence$Iterable, String.join$CharSequence$CharSequenceA
13+
1214
// BH 1/13/2019 3.2.4.07 adds Character.to[Title|Lower|Upper]Case(int)
1315
// BH 1/8/2019 3.2.4.07 fixes String.prototype.to[Upper|Lower]Case$java_util_Locale - using toLocal[Upper|Lower]Case()
1416
// BH 1/3/2019 3.2.4.07 adds ByteBuffer/CharBuffer support, proper CharSet encoding, including GBK (Standard Chinese)
@@ -3744,7 +3746,7 @@ function(s){
37443746
return Clazz.new_(Float.c$, [s]);
37453747
}, 1);
37463748

3747-
Float.isNaN$F = m$(Float,"isNaN",
3749+
Float.isNaN$F = m$(Float,"isNaN$",
37483750
function(num){
37493751
return isNaN(arguments.length == 1 ? num : this.valueOf());
37503752
});
@@ -4553,6 +4555,26 @@ String.copyValueOf$CA$I$I = function(data,offset,count) {
45534555
String.copyValueOf$CA = function(data) {
45544556
return sp.copyValueOf$CA$I$I(data, 0, data.length);
45554557
}
4558+
4559+
String.join$CharSequence$CharSequenceA = function(sep,array) {
4560+
var ret = "";
4561+
var s = "";
4562+
for (var i = 0; i < array.length; i++) {
4563+
ret += s + array[i].toString();
4564+
s || (s = sep);
4565+
}
4566+
return ret;
4567+
}
4568+
4569+
String.join$CharSequence$Iterable = function(sep,iter) {
4570+
var ret = "";
4571+
var s = "";
4572+
while (iter.hasNext$()) {
4573+
ret += s + iter.next$().toString();
4574+
s || (s = sep);
4575+
}
4576+
return ret;
4577+
}
45564578

45574579
var C$=Clazz.newClass(java.lang,"Character",function(){
45584580
if (typeof arguments[0] != "object")this.c$(arguments[0]);

0 commit comments

Comments
 (0)