(string: string, index = 0)
| 13 | } |
| 14 | |
| 15 | export 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 | |
| 23 | export function isSurrogatePair(string: string, start = 0): boolean { |
| 24 | return isHighSurrogate(string, start) && isLowSurrogate(string, start + 1); |
no outgoing calls
no test coverage detected