(str: string, chr: string, ix: number)
| 452 | } |
| 453 | |
| 454 | private static insertCharsAt(str: string, chr: string, ix: number): string { |
| 455 | if (ix === 0) { |
| 456 | return chr + str; |
| 457 | } else if (ix >= str.length) { |
| 458 | return str + chr; |
| 459 | } else { |
| 460 | return str.slice(0, ix) + chr + str.slice(ix); |
| 461 | } |
| 462 | } |
| 463 | |
| 464 | public clearTerminalBuffer() { |
| 465 | this.writeEmitter.fire(ACTIONS.clearAll()); |