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

Function isLowSurrogate

src/utils/characters.ts:15–21  ·  view source on GitHub ↗
(string: string, index = 0)

Source from the content-addressed store, hash-verified

13}
14
15export function isLowSurrogate(string: string, index = 0): boolean {
16 if (index < 0 || index >= string.length) {
17 return false;
18 }
19 const charCode = string.charCodeAt(index);
20 return charCode >= MIN_LOW_SURROGATE && charCode <= MAX_LOW_SURROGATE;
21}
22
23export function isSurrogatePair(string: string, start = 0): boolean {
24 return isHighSurrogate(string, start) && isLowSurrogate(string, start + 1);

Callers 2

characters.tsFile · 0.90
isSurrogatePairFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected