编码转表情字符
2021-03-24 本文已影响0人
兜兜里冒糖糖
1.表情字符转编码
"😁".codePointAt(0).toString(16) -> 1f601
encodeURIComponent("😁") -> %F0%9F%98%81
2.编码转表情字符
String.fromCodePoint('0x1f601') utf-32
1.表情字符转编码
"😁".codePointAt(0).toString(16) -> 1f601
encodeURIComponent("😁") -> %F0%9F%98%81
2.编码转表情字符
String.fromCodePoint('0x1f601') utf-32