aboutsummaryrefslogtreecommitdiff
path: root/src/libutil/fmt.hh
diff options
context:
space:
mode:
authorFishhh <hubert.gluchowski19@gmail.com>2022-01-21 16:13:34 +0100
committerFishhh <hubert.gluchowski19@gmail.com>2022-01-21 20:10:46 +0100
commit1e0b7cdc3f3169ae85d71df5b3f80872a8258779 (patch)
tree41c2bf06049fc19f9a820cfd80cc421f0829850a /src/libutil/fmt.hh
parentb03fe13b5bb5ce540215a7e8df0d63a99f389db5 (diff)
Move hilite_all into libutil and rename it to hiliteMatches
The signature was also changed so the function now accepts a vector instead of an iterator
Diffstat (limited to 'src/libutil/fmt.hh')
-rw-r--r--src/libutil/fmt.hh3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libutil/fmt.hh b/src/libutil/fmt.hh
index fd335b811..06c4a2049 100644
--- a/src/libutil/fmt.hh
+++ b/src/libutil/fmt.hh
@@ -2,6 +2,7 @@
#include <boost/format.hpp>
#include <string>
+#include <regex>
#include "ansicolor.hh"
@@ -154,4 +155,6 @@ inline hintformat hintfmt(std::string plain_string)
// we won't be receiving any args in this case, so just print the original string
return hintfmt("%s", normaltxt(plain_string));
}
+
+std::string hiliteMatches(const std::string &s, std::vector<std::smatch> matches, std::string prefix, std::string postfix);
}