[−][src]Function minigrep_tutorial::utilities::search
pub fn search<'a>(query: &str, contents: &'a str) -> Vec<&'a str>
Find all lines that match query
Example
use minigrep_tutorial::search; let query = "duct"; let contents = "\nRust:\nsafe, fast, productive.\nPick three"; assert_eq!(vec!["safe, fast, productive."], search(query, contents))