aGrUM 2.3.2
a C++ library for (probabilistic) graphical models
utils_string.h File Reference

Utilities for manipulating strings. More...

#include <cctype>
#include <cstdlib>
#include <sstream>
#include <string>
#include <vector>
#include <agrum/agrum.h>
#include <agrum/base/core/utils_string_inl.h>
Include dependency graph for utils_string.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  gum
 gum is the global namespace for all aGrUM entities

Functions

std::string gum::getUniqueFileName ()
 Returns a path to a unique file name.
std::string gum::toLower (std::string str)
 Returns the lowercase version of str.
bool gum::endsWith (std::string const &value, std::string const &ending)
 Returns true if value ends with ending.
std::vector< std::string > gum::split (const std::string &orig, const std::string &delimiter)
 Split str using the delimiter.
std::string gum::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& delimiter ) {
bool gum::isInteger (const std::string &val)
 return true is a string contains an integer value
bool gum::isIntegerWithResult (const std::string &val, int *res)
 return true is a string contains an integer value
bool gum::isNumerical (const std::string &val)
 return true is a string contains a numerical (double) value
bool gum::isNumericalWithResult (const std::string &val, double *res)
 return true is a string contains a numerical (double) value
void gum::ltrim (std::string &s)
 trim from start (in place)
void gum::rtrim (std::string &s)
 trim from end (in place)
void gum::trim (std::string &s)
 trim from both ends (in place)
std::string gum::trim_copy (const std::string &s)
 trim from both ends (copying)
std::string gum::remove_newline (const std::string &s)
 remove all newlines in a string
template<typename T>
std::string gum::compact_tostr (T value)
 Returns a path to a unique file name.

Detailed Description

Utilities for manipulating strings.

Author
Christophe GONZALES(_at_AMU) and Pierre-Henri WUILLEMIN(_at_LIP6)

Definition in file utils_string.h.