[−][src]Function minigrep_najeeb::search
pub fn search<'a>(query: &str, contents: &'a str) -> Vec<&'a str>
Search the query in string and return vector of lines, containing the query.
Examples
let query = String.from("hello"); let contents = String.from("hello, world"); let result = search(&query, &contents); assert_eq!(vec!["hello, world", result]);