* Replaces the characters from `start` to `end` with `content`, along with the appended/prepended content in * that range. The same restrictions as `s.remove()` apply. * * The fourth argument is optional. It can have a storeName property - if true, the original name will be stored * for
(
start: number,
end: number,
content: string,
options?: boolean | OverwriteOptions,
)
| 549 | * It may be preferred to use `s.update(...)` instead if you wish to avoid overwriting the appended/prepended content. |
| 550 | */ |
| 551 | overwrite( |
| 552 | start: number, |
| 553 | end: number, |
| 554 | content: string, |
| 555 | options?: boolean | OverwriteOptions, |
| 556 | ): this { |
| 557 | const optionObject = typeof options === 'object' && options ? options : {} |
| 558 | return this.update(start, end, content, { |
| 559 | ...optionObject, |
| 560 | overwrite: !optionObject.contentOnly, |
| 561 | }) |
| 562 | } |
| 563 | |
| 564 | /** |
| 565 | * Replaces the characters from `start` to `end` with `content`. The same restrictions as `s.remove()` apply. |
no test coverage detected