MCPcopy Create free account
hub / github.com/microsoft/vscode-cpptools / stripEscapeSequences

Function stripEscapeSequences

Extension/src/common.ts:1479–1484  ·  view source on GitHub ↗
(str: string)

Source from the content-addressed store, hash-verified

1477}
1478
1479export function stripEscapeSequences(str: string): string {
1480 return str
1481 .replace(/\x1b\[\??[0-9]{0,3}(;[0-9]{1,3})?[a-zA-Z]/g, '')
1482 .replace(/\u0008/g, '')
1483 .replace(/\r/g, '');
1484}
1485
1486export function splitLines(data: string): string[] {
1487 return data.split(/\r?\n/g);

Callers 2

getPasswordPromptFunction · 0.90
lastNonemptyLineFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected