Can you explain the significance of the values 0xd7ff
,0xe000
,and
(code << 10) + next - 0x35fdc00
?
const nonASCIIwhitespace = /[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/
const fullCharCodeAtPos = (input: string, pos: number) => {
if (String.fromCharCode) return input.codePointAt(pos)
const code = input.charCodeAt(pos)
if (code <= 0xd7ff || code >= 0xe000) return code
const next = input.charCodeAt(pos + 1)
return (code << 10) + next - 0x35fdc00
}