摘要: void base64_encode_s(const unsigned char *str, long inlen, std::string& outstr, long* lpBufLen) { long len; long str_len; //unsigned char *res; //std: 阅读全文
posted @ 2019-07-02 09:40 日月王 阅读(630) 评论(0) 推荐(0)
摘要: CString GetSuffix(CString strFileName) { return strFileName.Right(strFileName.GetLength()-strFileName.ReverseFind('.')-1); } std::string GetSuffix(con 阅读全文
posted @ 2019-07-02 09:35 日月王 阅读(400) 评论(0) 推荐(0)
摘要: BOOL GetFullTempFileName(const TCHAR* strPrefix, std::wstring& strFullName) { TCHAR strTempFolder[MAX_PATH]; TCHAR strTempFileName[MAX_PATH]; DWORD dw 阅读全文
posted @ 2019-07-02 09:34 日月王 阅读(550) 评论(0) 推荐(0)
摘要: std::string& str_toupper(std::string& s) { std::transform(s.begin(), s.end(), s.begin(), [](unsigned char c){ return ::toupper(c); } // correct ); ret 阅读全文
posted @ 2019-07-02 09:34 日月王 阅读(740) 评论(0) 推荐(0)
摘要: std::string& ltrim(std::string& str, const std::string& chars = "\t\n\v\f\r "); std::string& rtrim(std::string& str, const std::string& chars = "\t\n\ 阅读全文
posted @ 2019-07-02 09:33 日月王 阅读(403) 评论(0) 推荐(0)
摘要: unsigned char HEX2BYTE(unsigned char hex_ch) { if (hex_ch >= '0' && hex_ch <= '9') { return hex_ch - '0'; } if (hex_ch >= 'a' && hex_ch <= 'f') { retu 阅读全文
posted @ 2019-07-02 09:31 日月王 阅读(1580) 评论(0) 推荐(0)