12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- #include <kopano/platform.h>
- #include <kopano/ECDebugPrint.h>
- #include <kopano/ECDebug.h>
- #include <kopano/charset/convert.h>
- #include <kopano/stringutil.h>
- using namespace std;
- namespace KC {
- namespace details {
- string conversion_helpers<string>::convert_from(const wstring &s) {
- return convert_to<string>(s);
- }
- string conversion_helpers<string>::stringify(LPCVOID lpVoid) {
- if(!lpVoid) return "NULL";
- char szBuff[33];
- sprintf(szBuff, "0x%p", lpVoid);
- return szBuff;
- }
- const string conversion_helpers<string>::strNULL = "NULL";
- const string conversion_helpers<string>::strCOMMA= ",";
- wstring conversion_helpers<wstring>::convert_from(const string &s) {
- return convert_to<wstring>(s);
- }
- wstring conversion_helpers<wstring>::stringify(LPCVOID lpVoid) {
- if(!lpVoid) return L"NULL";
- wchar_t szBuff[33];
- swprintf(szBuff, ARRAY_SIZE(szBuff), L"0x%p", lpVoid);
- return szBuff;
- }
- const wstring conversion_helpers<wstring>::strNULL = L"NULL";
- const wstring conversion_helpers<wstring>::strCOMMA= L",";
- }
- }
|