DEV Community

loading...

Discussion on: Daily Challenge #1 - String Peeler

Collapse
rafi993 profile image
Rafi

Rust

fn main() {
  let input = "Hello, world!";
  let output = &input[1..(input.len() - 1)];
  println!("{}", output);
}
Forem Open with the Forem app