libgrep-rs 0.1.4

A tool for searching through text
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use libgrep_rs::options::Options;
use libgrep_rs::searcher::Searcher;

fn main() {
    
    let options = Options::default();
    let text = String::from("Steve Jobs unveiled the iProduct today");
    
    let searcher = Searcher::new(String::from("Jobs"), text, options, Some(String::from(" ")));
    let return_text: String = searcher.search();
    //should print: Jobs
    print!("{}", return_text);
}