mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Changes to cefclient in preparation for porting.
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@130 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
@ -5,33 +5,6 @@
|
||||
#include "string_util.h"
|
||||
#include <sstream>
|
||||
|
||||
|
||||
std::wstring StringToWString(const std::string& s)
|
||||
{
|
||||
wchar_t* wch;
|
||||
UINT bytes = MultiByteToWideChar(CP_ACP, 0, s.c_str(), s.size()+1, NULL, 0);
|
||||
wch = new wchar_t[bytes];
|
||||
if(wch)
|
||||
bytes = MultiByteToWideChar(CP_ACP, 0, s.c_str(), s.size()+1, wch, bytes);
|
||||
std::wstring str = wch;
|
||||
delete [] wch;
|
||||
return str;
|
||||
}
|
||||
|
||||
std::string WStringToString(const std::wstring& s)
|
||||
{
|
||||
char* ch;
|
||||
UINT bytes = WideCharToMultiByte(CP_ACP, 0, s.c_str(), s.size()+1, NULL, 0,
|
||||
NULL, NULL);
|
||||
ch = new char[bytes];
|
||||
if(ch)
|
||||
bytes = WideCharToMultiByte(CP_ACP, 0, s.c_str(), s.size()+1, ch, bytes,
|
||||
NULL, NULL);
|
||||
std::string str = ch;
|
||||
delete [] ch;
|
||||
return str;
|
||||
}
|
||||
|
||||
void DumpRequestContents(CefRefPtr<CefRequest> request, std::wstring& str)
|
||||
{
|
||||
std::wstringstream ss;
|
||||
|
Reference in New Issue
Block a user