Function minigrep_jondeaves::search_case_insensitive[][src]

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

Finds all lines within a block of text that contain the query, this method is case-insensitive

Examples

let query = "rUsT";
let contents = "\
Rust:
safe, fast, productive.
Pick three.
Trust me.";

assert_eq!(
    vec!["Rust:", "Trust me."],
    minigrep_jondeaves::search_case_insensitive(query, contents)
);