Update ch08-02-strings.md (#161)

链接 -> 连接
This commit is contained in:
Michael_Liu 2024-06-16 13:58:06 +08:00 committed by GitHub
parent e617db71c4
commit d027cbbbbe
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -142,7 +142,7 @@ let s3 = String::from("toe");
let s = s1 + "-" + &s2 + "-" + &s3;
```
这时 `s` 的内容会是 `tic-tac-toe`。在有这么多 `+``"` 字符的情况下,很难理解具体发生了什么。对于更为复杂的字符串接,可以使用 `format!` 宏:
这时 `s` 的内容会是 `tic-tac-toe`。在有这么多 `+``"` 字符的情况下,很难理解具体发生了什么。对于更为复杂的字符串接,可以使用 `format!` 宏:
```rust
let s1 = String::from("tic");