Last active
January 13, 2019 15:44
-
-
Save leopard627/f2883df7735504b4506f6582eeaf05b9 to your computer and use it in GitHub Desktop.
search worlds
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 search_foo(s: &String, word: &'static str) -> &'static str { | |
for (i, item) in s.chars().enumerate() { | |
if &s[i..i+3] == word { | |
return word | |
} | |
} | |
"" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment