* Same as `s.appendRight(...)`, except that the inserted content will go *before* any previous appends or prepends at `index`
(index: number, content: string)
| 690 | * Same as `s.appendRight(...)`, except that the inserted content will go *before* any previous appends or prepends at `index` |
| 691 | */ |
| 692 | prependRight(index: number, content: string): this { |
| 693 | index = index + this.offset |
| 694 | |
| 695 | if (typeof content !== 'string') |
| 696 | throw new TypeError('inserted content must be a string') |
| 697 | |
| 698 | if (DEBUG) |
| 699 | this.stats.time('insertRight') |
| 700 | |
| 701 | this._split(index) |
| 702 | |
| 703 | const chunk = this.byStart.get(index) |
| 704 | |
| 705 | if (chunk) { |
| 706 | chunk.prependRight(content) |
| 707 | } |
| 708 | else { |
| 709 | this.outro = content + this.outro |
| 710 | } |
| 711 | |
| 712 | if (DEBUG) |
| 713 | this.stats.timeEnd('insertRight') |
| 714 | return this |
| 715 | } |
| 716 | |
| 717 | /** |
| 718 | * Removes the characters from `start` to `end` (of the original string, **not** the generated string). |
no test coverage detected