Advertisement
Guest User

Untitled

a guest
Dec 7th, 2016
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. fn count_spaces(text: Vec<u8>) -> usize {
  2. text.split(|c| c == 32u8).count()
  3. }
  4.  
  5. fn count_spaces(text: Vec<u8>) -> usize {
  6. text.split(|&c| c == 32u8).count()
  7. }
  8.  
  9. fn count_spaces(text: Vec<u8>) -> usize {
  10. text.split(|c| *c == 32u8).count()
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement