Guest User

Untitled

a guest
Apr 16th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. fn return_words(input: &str) -> Vec<&str> {
  2. let words = input.split_whitespace();
  3.  
  4. let mut word_vec = Vec::new();
  5.  
  6. for word in words {
  7. word_vec.push(word);
  8. }
  9.  
  10. word_vec
  11. }
  12.  
  13. fn main() {
  14. println!("{:?}", return_words("potato cucumber santa snek"));
  15. }
Add Comment
Please, Sign In to add comment