function StringBuffer(str) {
    this.__strings__ = [str];
    return this;
}

StringBuffer.prototype = {
    constructor: StringBuffer,
    append: function (str) {
        this.__strings__.push(str);
        return this;
    },
    clear: function () {
        this.__strings__ = [];
    },
    toString: function () {
        return this.__strings__.join('');

    }
};

吉叶
46 声望4 粉丝