当前位置: 首页>>编程示例 >>用法及示例精选 >>正文


Node.js punycode.ucs2.decode(string)用法及代码示例

punycode.ucs2.decode(string)

添加于:v0.7.0

参数

punycode.ucs2.decode() 方法返回一个数组,其中包含字符串中每个 Unicode 符号的数字代码点值。

punycode.ucs2.decode('abc'); // [0x61, 0x62, 0x63]
// surrogate pair for U+1D306 tetragram for centre:
punycode.ucs2.decode('\uD834\uDF06'); // [0x1D306]

相关用法


注:本文由纯净天空筛选整理自nodejs.org大神的英文原创作品 punycode.ucs2.decode(string)。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。