|
Nix
2.93.0-dev
Lix: A modern, delicious implementation of the Nix package manager; unstable internal interfaces
|
#include <strings.hh>
Public Member Functions | |
| Rewriter (std::map< std::string, std::string > rewrites) | |
| std::string | operator() (std::string s) |
Rewrites a string given a map of replacements, applying the replacements in sorted order, only once, considering only the strings appearing in the input string in performing replacement.
"abb" with replacements {"ab" -> "ba"}, the result is "bab"."abcde" with replacements {"a" -> "b", "b" -> "c", "e" -> "b"}, the result is "bccdb".