daily pastebin goal
34%
SHARE
TWEET

Untitled

a guest Apr 16th, 2018 46 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
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top