Crate minigrep_test_package_001[][src]

Expand description

minigrep

minigrep is a small CLI implementation of the grep command, written in Rust.

This crate follows the tutorial laid out in Chapter 12 of The Book

Structs

Config

A fully valid minigrep command. Consists of a query to search for, a filename to search within, and a case_sensitive boolean to specify whether the search should ignore case or not

Functions

run

Given a valid config of arguments, run the minigrep application. This is the functional entry-point into the application.

search

search through each line in given contents and return any lines containing a match to the query

search_case_insensitive

search through each line in given contents and return any lines containing a case-insensitive match to the query.