字串slice:String中一部分值的引用,型別宣告寫作:&str { let s = String::from("hello world"); let hello = &s[0..5]; //左閉右開區間,指向第0個 ...
確定! 回上一頁