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


Node.js punycode.ucs2.encode(codePoints)用法及代码示例

punycode.ucs2.encode(codePoints)

添加于:v0.7.0

参数

punycode.ucs2.encode() 方法返回基于数字代码点值数组的字符串。

punycode.ucs2.encode([0x61, 0x62, 0x63]); // 'abc'
punycode.ucs2.encode([0x1D306]); // '\uD834\uDF06'

相关用法


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