Nix 2.26.3
Nix, the purely functional package manager; unstable internal interfaces
 
Loading...
Searching...
No Matches
hilite.hh File Reference
#include <regex>
#include <vector>
#include <string>

Go to the source code of this file.

Functions

std::string nix::hiliteMatches (std::string_view s, std::vector< std::smatch > matches, std::string_view prefix, std::string_view postfix)
 

Function Documentation

◆ hiliteMatches()

std::string nix::hiliteMatches ( std::string_view s,
std::vector< std::smatch > matches,
std::string_view prefix,
std::string_view postfix )

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.