30 #define __STRING_H__ 1
49 void str_replace(
string &str,
const string &from,
const string &to);
62 vector<string>
explode(
const string &separator,
string source);
78 void explode(
const string &separator,
string source, vector<string> &results);
94 void explode(
const string &separator,
string source, vector<int> &results);
110 void explode(
const string &separator,
string source,
111 vector<unsigned int> &results);
121 string implode(
const string &separator,
const vector<string> &vector);
131 template <
typename T>
132 typename std::enable_if<std::is_arithmetic<T>::value,
string>::type
133 implode(
const string &separator,
const vector<T> &v) {
134 vector<string> result;
135 for (
const auto &element : v)
136 result.push_back(to_string(element));
138 return implode(separator, result);
string implode(const string &separator, const vector< string > &vector)
Definition: string.cpp:112
void str_replace(string &str, const string &from, const string &to)
Rechercher remplacer.
Definition: string.cpp:25
double string_to_double(const string &number)
int string_to_int(const string &number)
vector< string > explode(const string &separator, string source)
Definition: string.cpp:33