Js的StringBuffer

function StringBuffer(){

    this._strings_ = new Array();

}

StringBuffer.prototype.append = function(str){

    this._strings_.push(str);

}

StringBuffer.prototype.toString = function(){

   this._strings_.join(""); 

}

posted @ 2014-03-07 20:43  小毅哥  阅读(124)  评论(0编辑  收藏  举报