Rust學習(12):slice

slice是String的一部分引用。類似切片。 文章目錄 字符串slice 其他slice 字符串slice slice獲取值的使用權但是沒有得到值得所有權 fn main() { let s = String::from("Hello world"); let hello = &s[0..5]; //[start, end) let world = &s[6..11]
相關文章
相關標籤/搜索