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

Function getTextEncoding

src/frontend/rtt_terminal.ts:245–251  ·  view source on GitHub ↗
(enc: string)

Source from the content-addressed store, hash-verified

243}
244
245function getTextEncoding(enc: string): TextEncoding {
246 enc = enc ? enc.toLowerCase() : '';
247 if (!(enc in TextEncoding)) {
248 return TextEncoding.UTF8;
249 }
250 return enc as TextEncoding;
251}
252class BinaryFormatter {
253 private readonly bytesNeeded = 4;
254 private buffer = Buffer.alloc(4);

Callers 1

sanitizeEncodingsMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected