Skip to content
This repository has been archived by the owner on Apr 7, 2021. It is now read-only.

Commit

Permalink
Add Char16ToWide helper function
Browse files Browse the repository at this point in the history
  • Loading branch information
Antidote committed Jan 24, 2017
1 parent 767d2a4 commit 5d797e5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions include/hecl/hecl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
5 changes: 5 additions & 0 deletions lib/hecl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -640,4 +640,9 @@ std::vector<std::pair<hecl::SystemString, std::string>> GetSystemLocations()
return ret;
}

std::wstring Char16ToWide(const std::u16string& src)
{
return std::wstring(src.begin(), src.end());
}

}

0 comments on commit 5d797e5

Please sign in to comment.