diff options
| author | 2023-07-21 17:37:42 +0100 | |
|---|---|---|
| committer | 2023-07-21 17:37:42 +0100 | |
| commit | d722f739208cbf9f16bcef199c4fbd837e833215 (patch) | |
| tree | 71eafbadbc0e345287aa85bdc2b0ead672f19f8c /include/stringutils.h | |
| parent | Remove the ability to treat notices specially in delaymsg. (diff) | |
Add a typedef for the Template::Replace map.
Diffstat (limited to 'include/stringutils.h')
| -rw-r--r-- | include/stringutils.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/stringutils.h b/include/stringutils.h index a7b040fd8..30710306e 100644 --- a/include/stringutils.h +++ b/include/stringutils.h @@ -155,12 +155,15 @@ namespace Percent namespace Template { + /** A mapping of variable names to their values. */ + typedef insp::flat_map<std::string, std::string> VariableMap; + /** Replaces template variables like %foo% within a string. * @param str The string to template from. * @param vars The variables to replace within the string. * @return The specified string with all variables replaced within it. */ - CoreExport std::string Replace(const std::string& str, const insp::flat_map<std::string, std::string>& vars); + CoreExport std::string Replace(const std::string& str, const VariableMap& vars); } /** Encapsulates a list of tokens in the format "* -FOO -BAR".*/ |
