search

Function search

Source
pub fn search<'a>(
    query: &str,
    contents: &'a str,
    number: bool,
    invert_match: bool,
) -> Vec<String>
Expand description
ยงExample to using this fn
 use search::search;
 
 fn main() {
     let query = "Rust";
     let contents = "Rust is good language";
     let results = search_case_instnsitive(query, contents, false, false);
     assert_eq!(results, vec!["Rust"]) // -> True
 }