(string: string, index = 0)
| 5 | const HEX_DIGIT = /^[0-9a-fA-F]$/; |
| 6 | |
| 7 | export function isHighSurrogate(string: string, index = 0): boolean { |
| 8 | if (index < 0 || index >= string.length) { |
| 9 | return false; |
| 10 | } |
| 11 | const charCode = string.charCodeAt(index); |
| 12 | return charCode >= MIN_HIGH_SURROGATE && charCode <= MAX_HIGH_SURROGATE; |
| 13 | } |
| 14 | |
| 15 | export function isLowSurrogate(string: string, index = 0): boolean { |
| 16 | if (index < 0 || index >= string.length) { |
no outgoing calls
no test coverage detected