GitHunt
DU

Durobot/minigrep

Minigrep example from The Rust Programming Language book

Minigrep example from The Rust Programming Language book

This is the Minigrep example project from The Rust Programming Language book, my take on it anyway (not 100% verbatim).

To run, use cargo run <search term> <file name>

For example cargo run to poem.txt

To run a case-insensitive search, set CASE_INSENSITIVE environment variable first, for example

CASE_INSENSITIVE=1 cargo run to poem.txt

To run the tests, issue the usual cargo test command.

Languages

Rust100.0%

Contributors

Created December 15, 2020
Updated January 12, 2021