[][src]Function nad2000_minigrep::search_case_insensitive

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

Search a string in the text (case insensitive).

Example

let text = r#"I'm nobody! Who are you?
Are you nobody, too?
Then there's a pair of us - don't tell!
They'd banish us, you know.

How dreary to be somebody!
How public, like a frog
To tell your name the livelong day
To an admiring bog!
"#;

for line in search_case_insensitive("FrO", text) {
    println!("{}", line);
}