Rust has a .. range syntax.

let s = String::from("hello world");
let hello = &s[0..5];
let world = &s[6..11];
let s = String::from("hello");
 
let len = s.len();
 
// Equal
let slice = &s[3..len];
let slice = &s[3..];
 
// Equal
let slice = &s[0..len];
let slice = &s[..];

String slice range indices must occur at valid UTF-8 character boundaries. If you attempt to create a string slice in the middle of a multibyte character, your program will exit with an error.