blob: c8385ad54b7e62fe4cb172f2f5f2779d5d74c6d6 (
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
|
#pragma once
#include <sstream>
#include <string>
#include <vector>
namespace bot {
namespace utils {
namespace string {
std::vector<std::string> split_text(const std::string &text,
char delimiter);
std::string join_vector(const std::vector<std::string> &vec,
char delimiter);
std::string join_vector(const std::vector<std::string> &vec);
template <typename T>
std::string str(T begin, T end, char delimiter) {
std::stringstream ss;
bool first = true;
for (; begin != end; begin++) {
if (!first) ss << delimiter;
ss << *begin;
first = false;
}
return ss.str();
}
bool string_contains_sql_injection(const std::string &input);
}
}
}
|