// Remove first and last letter of string fn main() { let text = "Hello, world"; // remove last letter let mut text = text.split_at(text.len() - 1); // remove first letter text = text.0.split_at(1); println!("{}", text.1); }