在 javascript 中使用 string buffer 的方法
function StringBuffer(){
this.content = new Array;
};
StringBuffer.prototype.append = function(str) {
this.content.push(str);
};
StringBuffer.prototype.toString = function() {
return this.content.join('');
};

choubee 發表在 痞客邦 留言(0) 人氣()