function StringBuilderEx(){Array.apply(this,arguments)}StringBuilderEx.prototype=[];StringBuilderEx.prototype.appendFormat=function(a){var b=this._convertToArray(arguments).slice(1);this[this.size()]=a.replace(/\{(\d+)\}/g,function(a,d){return b[d].toString()})};
StringBuilderEx.prototype.appendFormatEx=function(a){null==this._parameters&&(this._parameters=[]);for(var b=this._convertToArray(arguments).slice(1),c=0,d=b.size();c<d;c++)this._parameters[this._parameters.size()]=b[c];this[this.size()]=a};StringBuilderEx.prototype._convertToArray=function(a){if(!a)return[];if(a.toArray)return a.toArray();for(var b=a.size(),c=Array(b);b--;)c[b]=a[b];return c};
StringBuilderEx.prototype.toString=function(){var a=null!=this._parameters;if(a=a&&0<this._parameters.size()){for(var a=this.join("").split("?"),b=[],c=0,d=a.size();c<d;c++)b[b.size()]=a[c],b[b.size()]=this._parameters[c];return b.join("")}return this.join("")};StringBuilderEx.prototype.size=function(){for(var a=0;void 0!=this[a];)a++;return a};StringBuilderEx.prototype.join=function(a){var b="";void 0===a&&(a="");for(var c=0;void 0!=this[c];)0<c&&(b+=a),b+=this[c],c++;return b};
StringBuilderEx.prototype.push=function(){var a=this.size();if(void 0!=arguments)for(var b=0;b<arguments.length;b++)this[a]=arguments[b],a++};
