summaryrefslogtreecommitdiff
path: root/src/util/string.h
diff options
context:
space:
mode:
authorEkdohibs <nathanael.courant@laposte.net>2016-03-15 13:34:27 +0100
committerest31 <MTest31@outlook.com>2016-03-15 17:33:15 +0100
commit095f623fa7278375a6fa4fe01ed39d2b68cce7af (patch)
treeef8aa35d767870c6f47a115bfd1e1ca47d4deeca /src/util/string.h
parentaf30183124d40a969040d7de4b3a487feec466e4 (diff)
downloadminetest-095f623fa7278375a6fa4fe01ed39d2b68cce7af.tar.gz
minetest-095f623fa7278375a6fa4fe01ed39d2b68cce7af.tar.bz2
minetest-095f623fa7278375a6fa4fe01ed39d2b68cce7af.zip
Remove chat escape sequences from chat messages, for future colored chat.
Diffstat (limited to 'src/util/string.h')
-rw-r--r--src/util/string.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/util/string.h b/src/util/string.h
index cf94b7f5f..9e59ab20a 100644
--- a/src/util/string.h
+++ b/src/util/string.h
@@ -386,6 +386,13 @@ inline void str_replace(std::string &str, const std::string &pattern,
}
}
+/**
+ * Remove all chat escape sequences in \p s.
+ *
+ * @param s The string in which to remove escape sequences.
+ * @return \p s, with escape sequences removed.
+ */
+std::wstring removeChatEscapes(const std::wstring &s);
/**
* Replace all occurrences of the character \p from in \p str with \p to.