Skip to content

Commit dca9070

Browse files
committed
docs(string): add trimStart()/trimEnd()
1 parent c572b57 commit dca9070

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/string.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ ES2017 引入了字符串补全长度的功能。如果某个字符串不够指
331331

332332
## trimStart(),trimEnd()
333333

334-
ES2019 对字符串实例新增了`trimStart()``trimEnd()`这两个方法。它们的行为与`trim()`一致,`trimStart()`消除字符串头部的空格,`trimEnd()`消除尾部的空格。它们返回的都是新字符串,不会修改原始字符串。
334+
[ES2019](https://github.com/tc39/proposal-string-left-right-trim) 对字符串实例新增了`trimStart()``trimEnd()`这两个方法。它们的行为与`trim()`一致,`trimStart()`消除字符串头部的空格,`trimEnd()`消除尾部的空格。它们返回的都是新字符串,不会修改原始字符串。
335335

336336
```javascript
337337
const s = ' abc ';

0 commit comments

Comments
 (0)