I hope the following code is able to explain what I want ...
fn main() {
let s = "012345";
let i1 = s.chars().skip(2);
let i2 = s.chars().skip(4);
assert_eq!(to_slice(i1, i2), "23");
}
Edit: fixed off by one error.
I hope the following code is able to explain what I want ...
fn main() {
let s = "012345";
let i1 = s.chars().skip(2);
let i2 = s.chars().skip(4);
assert_eq!(to_slice(i1, i2), "23");
}
Edit: fixed off by one error.