Function search

Source
pub fn search<'a>(query: &str, contents: &'a str) -> Vec<&'a str>
Expand description

§Search

Search taking into account the character case.

§Example

let contents = "
who is
this?
Who are you?
";
let query = "who";
assert_eq!(grep_clone::search(query, contents), vec!["who is"]);