aGrUM  0.16.0
utils_string.h
Go to the documentation of this file.
1 
30 #ifndef GUM_UTILS_STRING_H
31 #define GUM_UTILS_STRING_H
32 
33 #include <cstdlib>
34 #include <sstream>
35 #include <string>
36 #include <vector>
37 
38 #include <agrum/agrum.h>
39 
40 #ifndef HAVE_MKSTEMP // mainly windows
41 # include <io.h>
42 #endif
43 
44 namespace gum {
47 
52  std::string getUniqueFileName();
53 
58  std::string toLower(std::string str);
59 
64  bool endsWith(std::string const& value, std::string const& ending);
65 
72  std::vector< std::string > split(const std::string& orig,
73  const std::string& delimiter);
74 
82  std::string replace(const std::string& s,
83  const std::string& val,
84  const std::string& new_val);
85 
87 } /* namespace gum */
88 
89 #ifndef GUM_NO_INLINE
91 #endif // GUM_NO_INLINE
92 
93 #endif /* GUM_UTILS_STRING_H */
std::string getUniqueFileName()
Returns a path to a unique file name.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
Definition: agrum.h:25
std::vector< std::string > split(const std::string &str, const std::string &delim)
Split str using the delimiter.
bool endsWith(std::string const &value, std::string const &ending)
Returns true if value ends with ending.
std::string toLower(std::string str)
Returns the lowercase version of str.
std::string replace(const std::string &s, const std::string &val, const std::string &new_val)
not usable for gcc 4.8 std::vector<std::string> split( const std::string& orig, const std::string& de...