blob: 4ec4c4ad770f9b2d60847b4539e19b01f5fe7138 (
plain)
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
|
#ifndef HIVE_MIND_UTIL_COMMON_H_
#define HIVE_MIND_UTIL_COMMON_H_
#include <exception>
#include <memory>
#include <variant>
#include <vector>
#include <random>
#include <string>
#include <mutex>
template<typename T>
using Arc = std::shared_ptr<T>;
template<typename T>
using Box = std::unique_ptr<T>;
using ulock = std::unique_lock<std::mutex>;
using std::make_shared;
using std::make_unique;
struct Void{};
std::string gen_random();
std::string url_encode(const std::string &s);
std::string url_decode(const std::string &s);
std::string html_encode(const std::string& data);
void load_text_resource(std::string filename, std::string key);
const std::string &get_text_resource(std::string key);
void str_replace(std::string& str, const std::string& from, const std::string& to);
#endif
|