diff --git a/src/libutil/fmt.hh b/src/libutil/fmt.hh index 06c4a2049..1f81bfcfb 100644 --- a/src/libutil/fmt.hh +++ b/src/libutil/fmt.hh @@ -156,5 +156,12 @@ inline hintformat hintfmt(std::string plain_string) return hintfmt("%s", normaltxt(plain_string)); } +/** + * Highlight all the given matches in the given string `s` by wrapping them + * between `prefix` and `postfix`. + * + * If some matches overlap, then their union will be wrapped rather than the + * individual matches. + */ std::string hiliteMatches(const std::string &s, std::vector matches, std::string prefix, std::string postfix); }