mirror of
https://github.com/unknwon/the-way-to-go_ZH_CN.git
synced 2025-08-11 23:08:34 +08:00
@@ -34,7 +34,7 @@ for ix, ch := range str {
|
||||
|
||||
最快速:`utf8.RuneCountInString(str)`
|
||||
|
||||
`len([]int(str))`
|
||||
`len([]rune(str))`
|
||||
|
||||
(5)如何连接字符串:
|
||||
|
||||
@@ -59,4 +59,4 @@ for ix, ch := range str {
|
||||
|
||||
- [目录](directory.md)
|
||||
- 上一节:[出于性能考虑的实用代码片段](18.0.md)
|
||||
- 下一节:[数组和切片](18.2.md)
|
||||
- 下一节:[数组和切片](18.2.md)
|
||||
|
Reference in New Issue
Block a user