mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 16:45:20 +02:00
Remove chat escape sequences from chat messages, for future colored chat.
This commit is contained in:
@@ -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.
|
||||
|
Reference in New Issue
Block a user