Fixed names utf8ToWide and wideToUtf8; added convenience functions

taking std:;string and core::stringw as parameter (removed .c_str()
in many function calls).
This commit is contained in:
hiker
2015-11-26 08:47:02 +11:00
parent 2f126ab226
commit f81bd5d0c5
12 changed files with 106 additions and 82 deletions
+4 -4
View File
@@ -686,7 +686,7 @@ namespace StringUtils
// ------------------------------------------------------------------------
std::string wide_to_utf8(const wchar_t* input)
std::string wideToUtf8(const wchar_t* input)
{
static std::vector<char> utf8line;
utf8line.clear();
@@ -695,11 +695,11 @@ namespace StringUtils
utf8line.push_back(0);
return std::string(&utf8line[0]);
}
} // wideToUtf8
// ------------------------------------------------------------------------
irr::core::stringw utf8_to_wide(const char* input)
irr::core::stringw utf8ToWide(const char* input)
{
static std::vector<wchar_t> utf16line;
utf16line.clear();
@@ -708,7 +708,7 @@ namespace StringUtils
utf16line.push_back(0);
return irr::core::stringw(&utf16line[0]);
}
} // utf8ToWide
// ------------------------------------------------------------------------
/** Converts a version string (in the form of 'X.Y.Za-rcU' into an