mirror of
https://github.com/unknwon/the-way-to-go_ZH_CN.git
synced 2025-11-13 09:16:10 +08:00
Update 07.6.md (#647)
This commit is contained in:
@@ -27,7 +27,7 @@ func main() {
|
|||||||
|
|
||||||
可以通过代码 `len([]int32(s))` 来获得字符串中字符的数量,但使用 `utf8.RuneCountInString(s)` 效率会更高一点。(参考[count_characters.go](exercises/chapter_4/count_characters.go))
|
可以通过代码 `len([]int32(s))` 来获得字符串中字符的数量,但使用 `utf8.RuneCountInString(s)` 效率会更高一点。(参考[count_characters.go](exercises/chapter_4/count_characters.go))
|
||||||
|
|
||||||
您还可以将一个字符串追加到某一个字符数组的尾部:
|
您还可以将一个字符串追加到某一个字节切片的尾部:
|
||||||
|
|
||||||
```go
|
```go
|
||||||
var b []byte
|
var b []byte
|
||||||
|
|||||||
Reference in New Issue
Block a user