Created
January 13, 2019 16:19
-
-
Save leopard627/f9bd2ea406de15d3cf2ed40b2204d10d 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' ' { | |
Some(i) | |
} | |
} | |
Some(0 as usize) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment