12345678910111213141516171819202122232425 |
- #pragma once
- #ifdef _UNICODE
- typedef std::wstring TString;
- #else
- typedef std::string TString;
- #endif
- namespace utils
- {
- std::string& trim(std::string& str);
- TString _dprintf(TCHAR* pszStr, ...);
- std::string ByteToChars(byte b);
- BOOL IsValidString(LPCTSTR lpszString);
- unsigned char TwoHexCharToInteger(char high, char low);
- std::string BytesToHexString(const unsigned char* pbuffer, int nLen);
- std::string BytesToHexString(const unsigned char* pbuffer, int nLen, char chSpace);
- std::string HexStringToBytes(std::string strHex, const int& len /* = 3 */);
- unsigned short CRC16Calculate(byte* pBuffer, unsigned int wordLength);
- bool GetResourceData(DWORD dwResourceID, LPCTSTR lpExt, std::string &rtnData);
- };
|