pub fn search_case_insensitive<'a>(
query: &str,
contents: &'a str,
) -> Vec<&'a str>
Expand description
The search_case_insensitive function takes a query string and a string slice and returns a vector of string slices that match the query, ignoring case.
ยงExample
let query = "rUsT";
let contents = "\
Rust:
safe, fast, productive.
Pick three.
Trust me.";
assert_eq!(vec!["Rust:", "Trust me."], daveparr_minigrep::search_case_insensitive(query, contents));