Skip to content

Commit 350f656

Browse files
authored
Update basic-types.md (#24)
1 parent 735496e commit 350f656

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

i18n/zh-cn/docusaurus-plugin-content-docs/current/basic-types.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ print(type(name)) # 获取变量的类型
7272
| 删除两端的空白字符 | `myStr.trim()` | `my_str.strip()` |
7373
| 按指定宽度居中对齐 | - | `my_str.center(width)` |
7474
| 第一个单词首字母大写 | `myStr.replace(myStr[0], myStr[0].toUpperCase())` | `my_str.capitalize()` |
75-
| 每个单词首字母大写 | `myStr.replace(/(^\w{1})|(\s+\w{1})/g, s => s.toUpperCase())` | `my_str.title()` |
75+
| 每个单词首字母大写 | `myStr.replace(/(^\w{1})\|(\s+\w{1})/g, s => s.toUpperCase())` | `my_str.title()` |
7676

7777
### 相关资源
7878
- https://docs.python.org/3/library/stdtypes.html

0 commit comments

Comments
 (0)