* 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,
)
| 575 | * It may be preferred to use `s.update(...)` instead if you wish to avoid overwriting the appended/prepended content. |
| 576 | */ |
| 577 | overwrite( |
| 578 | start: number, |
| 579 | end: number, |
| 580 | content: string, |
| 581 | options?: boolean | OverwriteOptions, |
| 582 | ): this { |
| 583 | const optionObject = typeof options === 'object' && options ? options : {} |
| 584 | return this.update(start, end, content, { |
| 585 | ...optionObject, |
| 586 | overwrite: !optionObject.contentOnly, |
| 587 | }) |
| 588 | } |
| 589 | |
| 590 | /** |
| 591 | * Replaces the characters from `start` to `end` with `content`. The same restrictions as `s.remove()` apply. |
no test coverage detected