summaryrefslogtreecommitdiff
path: root/src/util/string.cpp
diff options
context:
space:
mode:
authorJean-Patrick Guerrero <kilbith@users.noreply.github.com>2020-03-07 14:01:11 +0100
committerGitHub <noreply@github.com>2020-03-07 14:01:11 +0100
commit0e88176db8ce9f3fb631feb56bdd29d4ada054f5 (patch)
treecf0fa004db32724677ae05ba82b77767165f7219 /src/util/string.cpp
parentce8cdc03337ac20b998620f2690eb76e5434ffb9 (diff)
downloadminetest-0e88176db8ce9f3fb631feb56bdd29d4ada054f5.tar.gz
minetest-0e88176db8ce9f3fb631feb56bdd29d4ada054f5.tar.bz2
minetest-0e88176db8ce9f3fb631feb56bdd29d4ada054f5.zip
GUIHyperText: Fix bug with UTF8 chars in action name + simplify UTF8 stringw conversion (#9437)
Co-authored-by: Pierre-Yves Rollo <dev@pyrollo.com>
Diffstat (limited to 'src/util/string.cpp')
-rw-r--r--src/util/string.cpp25
1 files changed, 0 insertions, 25 deletions
diff --git a/src/util/string.cpp b/src/util/string.cpp
index 2134fbd15..e6c52585d 100644
--- a/src/util/string.cpp
+++ b/src/util/string.cpp
@@ -860,28 +860,3 @@ std::wstring translate_string(const std::wstring &s) {
translate_all(s, i, res);
return res;
}
-
-/**
- * Create a std::string from a irr::core:stringw.
- */
-std::string strwtostr(const irr::core::stringw &str)
-{
- std::string text = core::stringc(str.c_str()).c_str();
- return text;
-}
-
-/**
- * Create a irr::core:stringw from a std::string.
- */
-irr::core::stringw strtostrw(const std::string &str)
-{
- size_t size = str.size();
- // s.size() doesn't include NULL terminator
- wchar_t *text = new wchar_t[size + sizeof(wchar_t)];
- const char *data = &str[0];
-
- mbsrtowcs(text, &data, size, NULL);
-
- text[size] = L'\0';
- return text;
-}