[−][src]Function sublime_fuzzy::format_simple
pub fn format_simple(
match_: &Match,
target: &str,
before: &str,
after: &str
) -> String
Formats a Match
by appending before
before any matches and after
after any matches.
Examples
Basic usage:
use sublime_fuzzy::{best_match, format_simple}; let target_string = "some search thing"; let result = best_match("something", target_string).unwrap(); assert_eq!( format_simple(&result, target_string, "<span>", "</span>"), "<span>some</span> search <span>thing</span>" );