search

Function search 

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

Search query in file contents

ยงSearch string in file contents

use minigrep_4_study_rust::search;
let matches = search("hello", "other string hello other string");
let expected = vec!["other string hello other string"];
assert_eq!(expected, matches);