修改部分描述,添加必要的标点符号,补充代码超链接 (#804)

This commit is contained in:
Jck
2021-10-25 23:34:42 +08:00
committed by GitHub
parent d5578df00a
commit 39dbdb7094
100 changed files with 433 additions and 414 deletions

View File

@@ -15,7 +15,7 @@ s2:= string(c) // s2 == "cello"
substr := str[n:m]
```
3如何使用`for`或者`for-range`遍历一个字符串:
3如何使用 `for` 或者 `for-range` 遍历一个字符串:
```go
// gives only the bytes:
@@ -43,7 +43,7 @@ for ix, ch := range str {
`Strings.Join()`(参考[章节4.7](04.7.md)
使用`+=`
使用 `+=`
```go
str1 := "Hello "
@@ -51,7 +51,7 @@ for ix, ch := range str {
str1 += str2 //str1 == "Hello World!"
```
6如何解析命令行参数使用`os`或者`flag`包
6如何解析命令行参数使用 `os` 或者 `flag`
(参考[例12.4](examples/chapter_12/fileinput.go)