search

Function search 

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

Search content in a given contents

ยงExamples

let query = "to";
let contents = "\
hello
world
to where
";

assert_eq!(vec!["to where"], search(query, contents));