wide string: To{W,}String: provide overload for rvalue references

This commit is contained in:
Andrzej Rybczak
2015-06-13 16:50:51 +02:00
parent b3c0c0798e
commit 2ea3679220
2 changed files with 12 additions and 15 deletions

View File

@@ -18,21 +18,9 @@
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
#include <string> // include before boost to compile on MACOSX
#include <boost/locale/encoding_utf.hpp>
#include <cassert>
#include "utility/wide_string.h"
std::string ToString(const std::wstring &ws)
{
return boost::locale::conv::utf_to_utf<char>(ws);
}
std::wstring ToWString(const std::string &s)
{
return boost::locale::conv::utf_to_utf<wchar_t>(s);
}
size_t wideLength(const std::wstring &ws)
{
size_t result = 0;