Update string-slice.md

s的内容应该是"你好,世界!"
pull/326/head
Y 3 years ago committed by GitHub
parent 41067e44b4
commit b2a96851b8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -186,7 +186,7 @@ fn main() {
let mut s = String::from("你好,世界");
// 将字符'!'推入s中
s.push('!');
// 最后s的内容是"hello,world!"
// 最后s的内容是"你好,世界!"
assert_eq!(s,"你好,世界!");
let s1 = String::from("hello,");

Loading…
Cancel
Save