Contact: aviboots(AT)netvision.net.il
39,923 questions
51,856 answers
573 users
fn main() { let s : String = "rust\njava\nc#\nc\npython".to_string(); let lines : Vec<&str> = s.split("\n").collect(); println!("{:#?}", lines); } /* run: [ "rust", "java", "c#", "c", "python", ] */
fn main() { let s : String = "rust\njava\nc#\nc\npython".to_string(); let lines : Vec<&str> = s.split("\n").collect(); for st in &lines { println!("{}", st); } } /* run: rust java c# c python */