daily pastebin goal
10%
SHARE
TWEET

Untitled

a guest Apr 16th, 2018 45 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data
Top