mirror of
https://github.com/quinton-ashley/java2js
synced 2024-12-29 10:11:54 +01:00
21 lines
403 B
JavaScript
Executable File
21 lines
403 B
JavaScript
Executable File
jre.imports['java.lang.StringBuilder'].load = () => {
|
|
|
|
class StringBuilder {
|
|
constructor() {
|
|
this._str = "";
|
|
}
|
|
append(val) {
|
|
this._str = this._str + val;
|
|
return this;
|
|
}
|
|
insert(position, val) {
|
|
this._str = this._str.slice(0, position) + val + this._str.slice(position);
|
|
return this;
|
|
}
|
|
toString() {
|
|
return this._str;
|
|
}
|
|
}
|
|
jre.java.lang.StringBuilder = StringBuilder;
|
|
}
|