#pragma once #include #include #include namespace bot { namespace utils { namespace string { std::vector split_text(const std::string &text, char delimiter); std::string join_vector(const std::vector &vec, char delimiter); std::string join_vector(const std::vector &vec); template 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); std::vector> separate_by_length( const std::vector &vector, const int &max_length); std::vector separate_by_length( const std::string &base, const std::vector &values, const std::string &prefix, const std::string &separator, const long long &max_length); std::vector split_text_n(std::string value, const std::string &separator, const int &n); } } }