2 releases

0.1.1 Oct 13, 2024
0.1.0 Oct 13, 2024

#650 in Text processing

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