topical media & game development

talk show tell print

professional-javascript-17-stringbuffer.js / js



  function StringBuffer() {
      this.__strings__ = new Array;
  }
  
  StringBuffer.prototype.append = function (str) {
      this.__strings__.push(str);
  };
  
  StringBuffer.prototype.toString = function () {
      return this.__strings__.join("");
  };


(C) Æliens 20/2/2008

You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.