Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions Utils/Text Utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -388,17 +388,6 @@ void ParseCommandLine (
++*numargs;
}

inline std::string narrow(std::wstring const& text)
{
std::locale const loc("");
wchar_t const* from = text.c_str();
std::size_t const len = text.size();
std::vector<char> buffer(len + 1);
std::use_facet<std::ctype<wchar_t> >(loc).narrow(from, from + len, '_', &buffer[0]);

return std::string(&buffer[0], &buffer[len]);
}

// convert UTF-8 string to wstring
std::wstring utf8_to_wstring(const std::string& str)
{
Expand Down
2 changes: 0 additions & 2 deletions i18n/include/Text.h
Original file line number Diff line number Diff line change
Expand Up @@ -1803,8 +1803,6 @@ BOOLEAN LoadItemProsAndCons( UINT16 usIndex, STR16 pProsString, STR16 pConsStrin
BOOLEAN LoadBRDesc(UINT16 ubIndex, STR16 pDescString );
BOOLEAN LoadBRName(UINT16 ubIndex, STR16 pNameString );

// sevenfm
inline std::string narrow(std::wstring const& text);
// convert UTF-8 string to wstring
std::wstring utf8_to_wstring(const std::string& str);
// convert wstring to UTF-8 string
Expand Down