MCPcopy Create free account
hub / github.com/CJex/regulex / codePointEscape

Function codePointEscape

src/Kit.ts:334–337  ·  view source on GitHub ↗
(c: string)

Source from the content-addressed store, hash-verified

332 return '\\u' + code.toString(16).padStart(4, '0');
333 },
334 codePointEscape(c: string): string {
335 let code = c.codePointAt(0)!;
336 return '\\u{' + code.toString(16) + '}';
337 },
338 /** Ctrl A-Z */
339 ctrl(c: string): string {
340 return String.fromCharCode(c.charCodeAt(0) % 32);

Callers

nothing calls this directly

Calls 1

toStringMethod · 0.45

Tested by

no test coverage detected