Skip to main content

highlight_matches

Function highlight_matches 

Source
pub fn highlight_matches(content: &str, target: &str, fuzzy: bool) -> String
Expand description

将 content 中匹配 target 的部分用 ANSI 绿色高亮 fuzzy = true 时使用大小写不敏感匹配,否则精确匹配