We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 19506b0 commit 68a5059Copy full SHA for 68a5059
docs/string.md
@@ -180,13 +180,15 @@ ES5对字符串对象提供`charAt`方法,返回字符串给定位置的字符
180
181
上面代码中,`charAt`方法返回的是UTF-16编码的第一个字节,实际上是无法显示的。
182
183
-ES7提供了字符串实例的`at`方法,可以识别Unicode编号大于`0xFFFF`的字符,返回正确的字符。Chrome浏览器已经支持该方法。
+目前,有一个提案,提出字符串实例的`at`方法,可以识别Unicode编号大于`0xFFFF`的字符,返回正确的字符。
184
185
```javascript
186
'abc'.at(0) // "a"
187
'𠮷'.at(0) // "𠮷"
188
```
189
190
+这个方法可以通过[垫片库](https://github.com/es-shims/String.prototype.at)实现。
191
+
192
## normalize()
193
194
为了表示语调和重音符号,Unicode提供了两种方法。一种是直接提供带重音符号的字符,比如`Ǒ`(\u01D1)。另一种是提供合成符号(combining character),即原字符与重音符号的合成,两个字符合成一个字符,比如`O`(\u004F)和`ˇ`(\u030C)合成`Ǒ`(\u004F\u030C)。
0 commit comments