From c8406250806e27dfe618ee35cfd86a28b4f03545 Mon Sep 17 00:00:00 2001 From: Phillip Stephens Date: Mon, 23 Jan 2017 23:55:26 -0800 Subject: [PATCH] Add Char16ToWide helper function --- hecl/include/hecl/hecl.hpp | 1 + hecl/lib/hecl.cpp | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/hecl/include/hecl/hecl.hpp b/hecl/include/hecl/hecl.hpp index 4906c248b..779292d3e 100644 --- a/hecl/include/hecl/hecl.hpp +++ b/hecl/include/hecl/hecl.hpp @@ -53,6 +53,7 @@ extern logvisor::Module LogModule; std::string WideToUTF8(const std::wstring& src); std::string Char16ToUTF8(const std::u16string& src); +std::wstring Char16ToWide(const std::u16string& src); std::wstring UTF8ToWide(const std::string& src); std::u16string UTF8ToChar16(const std::string& src); diff --git a/hecl/lib/hecl.cpp b/hecl/lib/hecl.cpp index 8f26d98f8..21fbf2a25 100644 --- a/hecl/lib/hecl.cpp +++ b/hecl/lib/hecl.cpp @@ -640,4 +640,9 @@ std::vector> GetSystemLocations() return ret; } +std::wstring Char16ToWide(const std::u16string& src) +{ + return std::wstring(src.begin(), src.end()); +} + }