|
CoxIter 1.3
CoxIter - Computing invariants of hyperbolic Coxeter groups
|
Quelques fonctions relatives au string. More...
#include <cstdlib>#include <iterator>#include <sstream>#include <string>#include <vector>

Go to the source code of this file.
Functions | |
| void | str_replace (string &str, const string &from, const string &to) |
| Rechercher remplacer. | |
| vector< string > | explode (const string &separator, string source) |
| void | explode (const string &separator, string source, vector< string > &results) |
| Équivalent de la fonction explode en C++. | |
| void | explode (const string &separator, string source, vector< int > &results) |
| Équivalent de la fonction explode en C++. | |
| void | explode (const string &separator, string source, vector< unsigned int > &results) |
| Équivalent de la fonction explode en C++. | |
| string | implode (const string &separator, const vector< string > &vector) |
| template<typename T > | |
| std::enable_if< std::is_arithmetic< T >::value, string >::type | implode (const string &separator, const vector< T > &v) |
| int | string_to_int (const string &number) |
| double | string_to_double (const string &number) |
Quelques fonctions relatives au string.
| vector< string > explode | ( | const string & | separator, |
| string | source | ||
| ) |
\fn vector<string> explode(string source, const string &separator); \brief Équivalent de la fonction explode de PHP \param[in] source Chaîne de caractères sur laquelle on travaille \param[in] separator Séparateur \return vector<string>: Tableau contenant les résultats Prend une string ainsi qu'un séparateur et découpe la chaîne vers un
tableau
| void explode | ( | const string & | separator, |
| string | source, | ||
| vector< int > & | results | ||
| ) |
Équivalent de la fonction explode en C++.
\fn vector<string> explode(string source, const string &separator,
vector<int> &results);
| [in] | source | Chaîne de caractères sur laquelle on travaille |
| [in] | separator | Séparateur |
| [out] | results | Tableau auquel sont ajoutés les résultats (par référence) |
Prend une string ainsi qu'un séparateur et découpe la chaîne vers un tableau
| void explode | ( | const string & | separator, |
| string | source, | ||
| vector< string > & | results | ||
| ) |
Équivalent de la fonction explode en C++.
\fn vector<string> explode(string source, const string &separator,
vector<string> &results);
| [in] | source | Chaîne de caractères sur laquelle on travaille |
| [in] | separator | Séparateur |
| [out] | results | Tableau auquel sont ajoutés les résultats (par référence) |
Prend une string ainsi qu'un séparateur et découpe la chaîne vers un tableau
| void explode | ( | const string & | separator, |
| string | source, | ||
| vector< unsigned int > & | results | ||
| ) |
Équivalent de la fonction explode en C++.
\fn vector<string> explode(string source, const string &separator,
vector<unsigned int> &results);
| [in] | source | Chaîne de caractères sur laquelle on travaille |
| [in] | separator | Séparateur |
| [out] | results | Tableau auquel sont ajoutés les résultats (par référence) |
Prend une string ainsi qu'un séparateur et découpe la chaîne vers un tableau
| string implode | ( | const string & | separator, |
| const vector< string > & | vector | ||
| ) |
| std::enable_if< std::is_arithmetic< T >::value, string >::type implode | ( | const string & | separator, |
| const vector< T > & | v | ||
| ) |
| void str_replace | ( | string & | str, |
| const string & | from, | ||
| const string & | to | ||
| ) |
Rechercher remplacer.
| [out] | str | Chaîne dans laquelle se fait la recherche/remplacement |
| [in] | from | Chaîne à rechercher |
| [in] | to | Ce par quoi on remplace |
| double string_to_double | ( | const string & | number | ) |
| int string_to_int | ( | const string & | number | ) |