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-07-29 11:53:27 发布