Function naive_opt::string_search[][src]

pub fn string_search(haystack: &str, needle: &str) -> Option<usize>

search the needle in the haystack

return index of the haystack, if it found the needle. Otherwise return None.