MCPcopy Create free account
hub / github.com/compiler-explorer/compiler-explorer / encode

Function encode

test/numba-tests.ts:156–156  ·  view source on GitHub ↗
(c: string)

Source from the content-addressed store, hash-verified

154 expect(decode_symbols('_3clocals_3e')).toEqual('<locals>');
155 const all_ascii = [...Array.from({length: 128}).keys()].map(i => String.fromCodePoint(i)).join('');
156 const encode = (c: string) => '_' + c.codePointAt(0)!.toString(16).padStart(2, '0');
157 const all_ascii_encoded = all_ascii.replaceAll(/[^\d_a-z]/g, encode);
158 expect(decode_symbols(all_ascii_encoded)).toEqual(all_ascii);
159 });

Callers

nothing calls this directly

Calls 1

toStringMethod · 0.80

Tested by

no test coverage detected