-
Notifications
You must be signed in to change notification settings - Fork 1
/
Tools.h
39 lines (32 loc) · 795 Bytes
/
Tools.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#include <sys/types.h>
#include <sys/stat.h>
#include <iostream>
#include <fstream>
#include <vector>
#include <string>
#include "Header.h"
using namespace std;
typedef struct IniEditItems
{
string Node = "";
string Key = "";
string NewValue = "";
wstring NewWideValue = L"";
enum DataType {
STRING,
WSTRING
} Type = STRING;
} iniEditItems;
typedef vector <IniEditItems> IniEditItemSet;
int randNumber(int min, int max);
string ws2s(wstring str);
int dirNotExisted(const char *dir);
bool createStorageDir(const char *dir);
void putDirReadme(const char *dir);
HK_ERROR editPlayerCharFile(wstring fileName, IniEditItemSet &inis);
void lTrim(string &str);
void rTrim(string &str);
void trim(string &str);
void lTrim(wstring &str);
void rTrim(wstring &str);
void trim(wstring &str);