minigrep-cli-tool 0.1.1

A simple cli tool to search upon a text file for lines containing specified string
Documentation
  • Coverage
  • 100%
    3 out of 3 items documented3 out of 3 items with examples
  • Size
  • Source code size: 9.16 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.15 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 14s Average build duration of successful builds.
  • all releases: 15s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • shreedev44

minigrep_cli_tool

A lightweight library module that powers the MiniGrep CLI tool.

It provides two main functions for searching within text:

  • search (case-sensitive)
  • search_case_insensitive (case-insensitive)

Examples

use minigrep_cli_tool::{search, search_case_insensitive};

let query = "rust";
let contents = "Rust is fast.\nTrust in Rust.";

// Case-sensitive
let matches: Vec<&str> = search(query, contents).collect();

// Case-insensitive
let matches_insensitive: Vec<&str> = search_case_insensitive(query, contents).collect();