String.prototype.trim=function(){return this.leftTrim().rightTrim()};String.prototype.leftTrim=function(){return this.replace(/^\s*(.*)/,"$1")};String.prototype.rightTrim=function(){return this.replace(/^(.*\S)(\s*)$/,"$1")};function StringBuffer(){this.buffer=[]}StringBuffer.prototype.append=function append(a){this.buffer.push(a);return this};StringBuffer.prototype.toString=function toString(){return this.buffer.join("")};
