search

Function search

Source
pub fn search<'a>(
    query: &str,
    contents: &'a str,
    number: bool,
    invert_match: bool,
    _case: 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(query, contents, false, false, false);
     assert_eq!(results, vec!["Rust is good language"]) // -> True
 }