punycode.ucs2.decode(string)
string
<string>
punycode.ucs2.decode()
方法返回一个数组,其中包含字符串中每个 Unicode 符号的数字代码点值。
punycode.ucs2.decode('abc'); // [0x61, 0x62, 0x63]
// U+1D306 中心四元组的代理对:
punycode.ucs2.decode('\uD834\uDF06'); // [0x1D306]
string
<string>
The punycode.ucs2.decode()
method returns an array containing the numeric
codepoint values of each Unicode symbol in the string.
punycode.ucs2.decode('abc'); // [0x61, 0x62, 0x63]
// surrogate pair for U+1D306 tetragram for centre:
punycode.ucs2.decode('\uD834\uDF06'); // [0x1D306]