[−][src]Function metasophiea_minigrep::search
pub fn search<'a>(query: &str, contents: &'a str) -> Vec<&'a str>
This function searches for a string in a given string
Examples
let query = "duct"; let contents = "\ Rust: safe, fast, productive. Pick three. Duct tape."; assert_eq!(vec!["safe, fast, productive."], search(query,contents));