burp-brightscript
Version:
lightweight processor for roku brightscript projects
14 lines • 475 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
function spliceString(str, index, count, add) {
// We cannot pass negative indexes directly to the 2nd slicing operation.
if (index < 0) {
index = str.length + index;
if (index < 0) {
index = 0;
}
}
return str.slice(0, index) + (add || '') + str.slice(index + count);
}
exports.spliceString = spliceString;
//# sourceMappingURL=StringUtils.js.map