depath icon indicating copy to clipboard operation
depath copied to clipboard

能帮忙解答一下这段代码什么意思吗

Open zhangzhaoaaa opened this issue 4 years ago • 1 comments

`const fullCharCodeAtPos = (input: string, pos: number) => { const code = input.charCodeAt(pos) // 合法字符的判断,能给个依据吗,我在网上搜到这个判断,但不知道出处在哪 if (code <= 0xd7ff || code >= 0xe000) return code

const next = input.charCodeAt(pos + 1) // 以下这个运算没看懂 return (code << 10) + next - 0x35fdc00 }`

zhangzhaoaaa avatar Jul 28 '20 09:07 zhangzhaoaaa

https://github.com/acornjs/acorn/issues/708

acbde45 avatar Dec 07 '20 09:12 acbde45