Skip to content

Commit 65d72c0

Browse files
committed
docs(stdlib/string): fix typo
1 parent a4bd6ee commit 65d72c0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/stdlib/string.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ s.charAt(s.length - 1) // "c"
110110

111111
### String.prototype.charCodeAt()
112112

113-
`charCodeAt`方法返回字符串指定位置的 Unicode 码点(十进制表示),相当于`String.fromCharCode()`的逆操作。
113+
`charCodeAt()`方法返回字符串指定位置的 Unicode 码点(十进制表示),相当于`String.fromCharCode()`的逆操作。
114114

115115
```javascript
116116
'abc'.charCodeAt(1) // 98
@@ -131,7 +131,7 @@ s.charAt(s.length - 1) // "c"
131131
'abc'.charCodeAt(4) // NaN
132132
```
133133

134-
注意,`charCodeAt`方法返回的 Unicode 码点不会大于65536(0xFFFF),也就是说,只返回两个字节的字符的码点。如果遇到码点大于 65536 的字符(四个字节的字符),必需连续使用两次`charCodeAt`,不仅读入`charCodeAt(i)`,还要读入`charCodeAt(i+1)`,将两个值放在一起,才能得到准确的字符。
134+
注意,`charCodeAt`方法返回的 Unicode 码点不会大于65536(0xFFFF),也就是说,只返回两个字节的字符的码点。如果遇到码点大于 65536 的字符(四个字节的字符),必须连续使用两次`charCodeAt`,不仅读入`charCodeAt(i)`,还要读入`charCodeAt(i+1)`,将两个值放在一起,才能得到准确的字符。
135135

136136
### String.prototype.concat()
137137

0 commit comments

Comments
 (0)