而Rust 的設計師應該也跟我一樣懶惰,所以起始的index 預設為0 因此我們也可以這樣寫, let s = String::from("hello"); // 這兩個相等let slice = &s[0..2]; let ...
確定! 回上一頁