26 lines
639 B
C++
26 lines
639 B
C++
#ifndef BF_UTIL_H
|
|
#define BF_UTIL_H
|
|
|
|
#include <spdlog/sinks/stdout_color_sinks.h>
|
|
#include <spdlog/spdlog.h>
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
extern std::shared_ptr<spdlog::logger> gLogger;
|
|
|
|
class BF_Util
|
|
{
|
|
public:
|
|
BF_Util() = default;
|
|
|
|
public:
|
|
static void initLogger();
|
|
static void setLogLevel(spdlog::level::level_enum level);
|
|
static std::string MD5(const std::string& data);
|
|
static std::string RandomStrNum();
|
|
static std::string urlEncode(const std::string& data);
|
|
static std::vector<std::string> split(const std::string& str, const std::string& delim);
|
|
static void trim(std::string& str);
|
|
};
|
|
|
|
#endif |