function StringBuffer(begText) {
    this.strings = new Array;
    if (begText) {
      this.append(begText);
    }
}

StringBuffer.prototype.append = function(str) {
    this.strings.push(str);
    return this;
}

StringBuffer.prototype.toString = function() {
    return this.strings.join('');
}

StringBuffer.prototype.isEmpty = function() {
    return this.strings.length == 0;
}
