ngx-restful-client
Version:
The ultimate Angular library to exquisitely declare and implement the REST APIs you'll use in your application.
28 lines (27 loc) • 982 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
var exception_1 = require("./exception");
var StringBuilder = /** @class */ (function () {
function StringBuilder(str) {
this._building = str || '';
}
StringBuilder.prototype.append = function (value) {
this._building += value;
return this;
};
StringBuilder.prototype.insert = function (offset, value) {
if (!offset && this._building.length - 1 < offset) {
throw new exception_1.IndexOutOfBoundsException(offset);
}
this._building = this._building.substring(0, offset) + value + this._building.substr(offset, this._building.length);
return this;
};
StringBuilder.prototype.indexOf = function (c) {
return this._building.indexOf(c);
};
StringBuilder.prototype.toString = function () {
return this._building;
};
return StringBuilder;
}());
exports.StringBuilder = StringBuilder;