Update string-slice.md

最后一个字节是4~
pull/143/head
ZiJiaW 3 years ago committed by GitHub
parent e09d94bb8c
commit 2220a451c9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -67,8 +67,8 @@ let s = String::from("hello");
let len = s.len();
let slice = &s[3..len];
let slice = &s[3..];
let slice = &s[4..len];
let slice = &s[4..];
```
你也可以截取完整的`String`切片:

Loading…
Cancel
Save