let mut s = String::from("hello"); s.push('!'); // 追加单个字符 s.push_str(", world"); // 追加字符串切片 println!("{}", s); // 输出:hello, world!