js 效率组装字符串 StringBuffer
人气:0
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;
}
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;
}
加载全部内容