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