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

Method removeCharAt

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

Source from the content-addressed store, hash-verified

442 }
443
444 private static removeCharAt(str: string, ix: number): string {
445 if (ix === 0) {
446 return str.slice(1);
447 } else if (ix >= (str.length - 1)) {
448 return str.slice(0, -1);
449 } else {
450 return str.slice(0, ix) + str.slice(ix + 1);
451 }
452 }
453
454 private static insertCharsAt(str: string, chr: string, ix: number): string {
455 if (ix === 0) {

Callers 2

killCurrCharMethod · 0.80
killPrevCharMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected