Add reverse() function to js version of StringBuilder
This commit is contained in:
committed by
Andrey Breslav
parent
962a738f1e
commit
aee199b5b0
@@ -603,6 +603,10 @@
|
||||
this.string = this.string + obj.toString();
|
||||
return this;
|
||||
},
|
||||
reverse: function () {
|
||||
this.string = this.string.split("").reverse().join("");
|
||||
return this;
|
||||
},
|
||||
toString: function () {
|
||||
return this.string;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user