2 releases

0.1.1 Oct 13, 2024
0.1.0 Oct 13, 2024

#1 in #mini-grep

Download history 275/week @ 2024-10-13 4/week @ 2024-10-20

279 downloads per month

MIT license

7KB
96 lines

minigrep

minigrep 是一个简单的命令行工具,用于搜索文件中的文本。

例子

let query = "duct";
let contents = "\
Rust:
safe, fast, productive.
Pick three.
Duct tape.";

assert_eq!(vec!["safe, fast, productive."], minigrep::search(query, contents));

lib.rs:

minigrep

minigrep 是一个简单的命令行工具,用于搜索文件中的文本。

例子

let query = "duct";
let contents = "\
Rust:
safe, fast, productive.
Pick three.
Duct tape.";

assert_eq!(vec!["safe, fast, productive."], minigrep::search(query, contents));

No runtime deps