MCPcopy Create free account
hub / github.com/aiscript-dev/aiscript / getLastUnicodeChar

Function getLastUnicodeChar

src/parser/streams/char-stream.ts:172–177  ·  view source on GitHub ↗
(string: string, position = string.length)

Source from the content-addressed store, hash-verified

170}
171
172function getLastUnicodeChar(string: string, position = string.length): string | undefined {
173 if (isSurrogatePair(string, position - 2)) {
174 return string.slice(position - 2, position);
175 }
176 return string[position - 1];
177}

Callers 2

decAddrMethod · 0.85
loadPrevCharMethod · 0.85

Calls 1

isSurrogatePairFunction · 0.85

Tested by

no test coverage detected