aboutsummaryrefslogtreecommitdiff
path: root/include/stringutils.h
diff options
context:
space:
mode:
authorGravatar Sadie Powell2023-07-21 17:37:42 +0100
committerGravatar Sadie Powell2023-07-21 17:37:42 +0100
commitd722f739208cbf9f16bcef199c4fbd837e833215 (patch)
tree71eafbadbc0e345287aa85bdc2b0ead672f19f8c /include/stringutils.h
parentRemove 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.h5
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".*/