MCPcopy Create free account
hub / github.com/Marus/cortex-debug / insertCharsAt

Method insertCharsAt

src/frontend/pty.ts:454–462  ·  view source on GitHub ↗
(str: string, chr: string, ix: number)

Source from the content-addressed store, hash-verified

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());

Callers 1

handleOtherCharsMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected