Quelques fonctions relatives au string.
More...
#include <string>
#include <sstream>
#include <cstdlib>
#include <vector>
#include <iterator>
Go to the source code of this file.
|
| void | str_replace (string &str, const string &from, const string &to) |
| | Rechercher remplacer. More...
|
| |
| vector< string > | explode (const string &separator, string source) |
| |
| void | explode (const string &separator, string source, vector< string > &results) |
| |
| void | explode (const string &separator, string source, vector< int > &results) |
| |
| void | explode (const string &separator, string source, vector< unsigned int > &results) |
| |
| string | implode (const string &strSeparator, const vector< string > &strVector) |
| |
| template<typename T > |
| std::enable_if< std::is_arithmetic< T >::value, string >::type | implode (const string &strSeparator, const vector< T > &iVector) |
| |
| int | string_to_int (const string &strNumber) |
| |
| double | string_to_double (const string &strNumber) |
| |
Quelques fonctions relatives au string.
- Author
- Rafael Guglielmetti
| vector<string> explode |
( |
const string & |
separator, |
|
|
string |
source |
|
) |
| |
| void explode |
( |
const string & |
separator, |
|
|
string |
source, |
|
|
vector< string > & |
results |
|
) |
| |
| void explode |
( |
const string & |
separator, |
|
|
string |
source, |
|
|
vector< int > & |
results |
|
) |
| |
| void explode |
( |
const string & |
separator, |
|
|
string |
source, |
|
|
vector< unsigned int > & |
results |
|
) |
| |
| string implode |
( |
const string & |
strSeparator, |
|
|
const vector< string > & |
strVector |
|
) |
| |
template<typename T >
| std::enable_if<std::is_arithmetic<T>::value, string>::type implode |
( |
const string & |
strSeparator, |
|
|
const vector< T > & |
iVector |
|
) |
| |
| void str_replace |
( |
string & |
str, |
|
|
const string & |
from, |
|
|
const string & |
to |
|
) |
| |
Rechercher remplacer.
- Parameters
-
| [out] | str | Chaîne dans laquelle se fait la recherche/remplacement |
| [in] | from | Chaîne à rechercher |
| [in] | to | Ce par quoi on remplace |
- Returns
- void
| double string_to_double |
( |
const string & |
strNumber | ) |
|
| int string_to_int |
( |
const string & |
strNumber | ) |
|