This commit is contained in:
11
WebRoot/js/StringBuffer.js
Normal file
11
WebRoot/js/StringBuffer.js
Normal file
@@ -0,0 +1,11 @@
|
||||
function StringBuffer() {
|
||||
this.array = new Array();
|
||||
}
|
||||
StringBuffer.prototype.append = function(value) {
|
||||
this.array[this.array.length] = value;
|
||||
return this;
|
||||
}
|
||||
StringBuffer.prototype.toString = function() {
|
||||
var _string = this.array.join("");
|
||||
return _string;
|
||||
}
|
||||
Reference in New Issue
Block a user