【发布时间】:2017-09-08 09:57:30
【问题描述】:
据我们所知,ECMAScript 2015 为 32 位字符添加了 String.fromCodePoint()
。
var poop = '????????????';
console.log(poop.length);
但如果我们仍然使用String.length(),它也会处理字符串 16 位的所有字符。 EcmaScript UTF-16 32-bit Char 是否有内置的字符串长度支持?
【问题讨论】:
标签: javascript ecmascript-6 utf-16