ysn_minigrep 0.1.0

This crate contains my implementation of the minigrep program
Documentation
  • Coverage
  • 40%
    8 out of 20 items documented2 out of 9 items with examples
  • Size
  • Source code size: 5.25 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.76 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • ysereckissy

This file contains the implementation of the library used in the minigrep console program. The main functions contained in this file are: search used to search for a query string in the file search_case_sensitive use to perform the same search but in case sensitive way.

The following example code shows how to use the package

use std::env;
use std::process;
use minigrep::Config;
use minigrep::mix;
use minigrep::PrimaryColor;
fn main() {
    let config = Config::build(env::args()).unwrap_or_else(|err| {
       eprintln!("Problem parsing arguments: {err}");
       process::exit(1);
   });
   if let Err(e) = minigrep::run(config) {
       eprintln!("Application error: {e}");
       process::exit(1);
   }
   let red = PrimaryColor::Red;
   let yellow = PrimaryColor::Yellow;
   mix(red, yellow);
}