aboutsummaryrefslogtreecommitdiff
path: root/src/libutil/fmt.hh
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2022-04-21 11:58:40 +0200
committerEelco Dolstra <edolstra@gmail.com>2022-04-21 12:06:29 +0200
commitf05e1f6fbb8a760f23a7af16b065078df6588acf (patch)
tree618d7ce614dcbabb8170a8c397fe6f68a8badf4e /src/libutil/fmt.hh
parent684e679e07d3a8d9da1449347e5e07da2d718916 (diff)
Move hiliteMatches into a separate header
This is mostly so that we don't #include <regex> everywhere (which adds quite a bit of compilation time).
Diffstat (limited to 'src/libutil/fmt.hh')
-rw-r--r--src/libutil/fmt.hh12
1 files changed, 0 insertions, 12 deletions
diff --git a/src/libutil/fmt.hh b/src/libutil/fmt.hh
index 0821b3b74..7664e5c04 100644
--- a/src/libutil/fmt.hh
+++ b/src/libutil/fmt.hh
@@ -2,7 +2,6 @@
#include <boost/format.hpp>
#include <string>
-#include <regex>
#include "ansicolor.hh"
@@ -155,15 +154,4 @@ 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(
- std::string_view s,
- std::vector<std::smatch> matches,
- std::string_view prefix,
- std::string_view postfix);
-
}