Crate zzq_minigrep

Crate zzq_minigrep 

Source
Expand description

§Minigrep

minigrep 是用来在文件中查找相关字符串的工具类

Structs§

Config
输入配置实体类

Functions§

add_one
Adds one to the number given.
run
根据配置参数信息运行,查找文件里面的文本和query一致的信息
search
Iterate through each line of the contents. Check whether the line contains our query string. If it does, add it to the list of values we’re returning. If it doesn’t, do nothing. Return the list of results that match.
search_case_insensitive
大小写敏感搜索