[−][src]Function qwtsc::search
pub fn search<'a>(query: &str, contents: &'a str) -> Vec<&'a str>
search the word in the text
Example
let query = "duct"; let contents = "Rust: \nsafe, fast, productive.\n Pick three."; assert_eq!(vec!["safe, fast, productive."], minigrep::search(query, contents));