Last active
January 13, 2019 16:27
-
-
Save leopard627/7496a0e2d0be16504724d7b2c9846d63 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fn first_blank_finder(s: &String) -> Option<usize> { | |
let bytes = s.as_bytes(); | |
for (i, &item) in bytes.iter().enumerate() { | |
if item == b' ' { | |
return Some(i) | |
} | |
} | |
Some(0 as usize) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment