-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathutility.hpp
32 lines (24 loc) · 1.04 KB
/
utility.hpp
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
#ifndef LOG_NOT_UTILITY_H
#define LOG_NOT_UTILITY_H
#include "lognot.hpp"
int _formatString(std::string &str, const char *fmt, va_list &vargs, int size);
class LNUtility {
public:
static std::string formatString(const char *format, ...);
static std::vector<std::string> &explodeString(std::vector<std::string> &result,
const std::string &str,
const std::string &separator);
static std::string trimString(const std::string &str,
std::string char_set = STD_TRIM_CHAR_SET);
static std::string replaceString(const std::string &search,
const std::string &replace,
const std::string &subject);
static std::string toUpper(const std::string &str);
static std::string toLower(const std::string &str);
static std::string getUUID();
static unsigned int _update_crc(unsigned int crc, const unsigned char *buf, int len);
static unsigned int _crc(const unsigned char *buf, int len);
static std::string crc(const std::string &s);
static unsigned int crci(const std::string &s);
};
#endif // LOG_NOT_UTILITY_H