1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-28 05:21:16 +02:00

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
This commit is contained in:
Fishhh 2022-01-21 16:13:34 +01:00
parent b03fe13b5b
commit 1e0b7cdc3f
No known key found for this signature in database
GPG key ID: FDB7055C732D177D
3 changed files with 45 additions and 50 deletions

View file

@ -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);
}