|
|
@ -292,8 +292,7 @@ fn main() {
|
|
|
|
s.push('r');
|
|
|
|
s.push('r');
|
|
|
|
println!("追加字符 push() -> {}", s);
|
|
|
|
println!("追加字符 push() -> {}", s);
|
|
|
|
|
|
|
|
|
|
|
|
s.push_str("ust!")
|
|
|
|
s.push_str("ust!");
|
|
|
|
;
|
|
|
|
|
|
|
|
println!("追加字符串 push_str() -> {}", s);
|
|
|
|
println!("追加字符串 push_str() -> {}", s);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
```
|
|
|
|
```
|
|
|
@ -675,4 +674,4 @@ for b in "中国人".bytes() {
|
|
|
|
|
|
|
|
|
|
|
|
## 引用资料
|
|
|
|
## 引用资料
|
|
|
|
|
|
|
|
|
|
|
|
1. https://blog.csdn.net/a1595901624/article/details/119294443
|
|
|
|
1. https://blog.csdn.net/a1595901624/article/details/119294443
|
|
|
|