2024-03-19 17:45:12 +08:00
|
|
|
|
#pragma once
|
|
|
|
|
#include "../stdafx.h"
|
|
|
|
|
#include <vector>
|
|
|
|
|
#include <fstream>
|
|
|
|
|
using namespace std;
|
|
|
|
|
|
|
|
|
|
class StringHelper
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
StringHelper();
|
|
|
|
|
~StringHelper();
|
|
|
|
|
|
|
|
|
|
static string AsciiToUtf8(const string& str);
|
2024-05-22 15:58:54 +08:00
|
|
|
|
//static string Utf8ToAscii(const string& str);
|
2024-03-19 17:45:12 +08:00
|
|
|
|
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");
|
|
|
|
|
};
|
|
|
|
|
|