MemoryCheck/utils/StringHelper.h
2025-08-20 11:22:14 +08:00

32 lines
715 B
C++

#pragma once
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif // !WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <tchar.h>
#include <string>
#include <atlbase.h>
#include <vector>
#include <fstream>
using namespace std;
class StringHelper
{
public:
StringHelper();
~StringHelper();
static string AsciiToUtf8(const string& str);
static string Utf8ToAscii(const string& str);
static string GenerateUUID();
static void Split(string str, char dim, vector<string>& rels);
static wstring Str2Wstr(string str);
static string Wstr2Str(wstring str);
static string ReadString(ifstream* ifs);
static string Double2String(double dvalue, string frt = "%.12f");
static string GetAppPath();
};