function StringBuffer(){
this._strings = new Array();
}
StringBuffer.prototype.append = function(str){
this._strings.push(str);
return this;
}
StringBuffer.prototype.toString = function(){
return this._strings.join("");
}
StringBuffer.prototype.length = function(){
var str = this._strings.join("");
return str.length;
}
js 之 StringBuffer 工具类
最新推荐文章于 2024-05-03 11:08:18 发布