use std::string::String; // This code is editable and runnable! fn main() { // A simple hello world let program = "H W f R P"; let mut msg = String::from_str(""); for token in program.chars() { match token { 'H' => msg.push_str("Hello "), 'W' => msg.push_str("World, "), 'f' => msg.push_str("from "), 'R' => msg.push_str("RJM "), 'P' => msg.push_str("Programming "), _ => { /* ignore everything else */ } } } println!("{}", msg); }