DaZeus  2.0
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Friends Macros
utils.h File Reference
#include <string>
#include <vector>
#include <sstream>
#include <algorithm>
#include <map>
Include dependency graph for utils.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

std::string strToLower (const std::string &f)
 
std::string strToUpper (const std::string &f)
 
std::string strToIdentifier (const std::string &f)
 
std::string trim (const std::string &s)
 
std::vector< std::string > split (const std::string &s, const std::string &sep)
 
bool contains (std::string x, char v)
 
bool startsWith (std::string x, std::string y, bool caseInsensitive)
 
std::vector< std::string >
::iterator 
find_ci (std::vector< std::string > &v, const std::string &s)
 
template<typename Container , typename Key >
bool contains (Container x, Key k)
 
template<typename Value >
bool contains (std::vector< Value > x, Value v)
 
template<typename Container , typename Value >
void erase (Container &x, Value v)
 
template<typename Container , typename Value >
Value takeFirst (Container c)
 
template<typename Value >
std::map< std::string, Value >
::iterator 
find_ci (std::map< std::string, Value > &m, const std::string &s)
 
template<typename Container , typename Key >
bool contains_ci (Container x, Key s)
 
template<typename Container >
void erase_ci (Container &x, const std::string &s)
 
template<typename Container >
std::string join (Container c, std::string s)
 
std::vector< std::string > & operator<< (std::vector< std::string > &x, const char *v)
 
template<typename T >
std::vector< T > & operator<< (std::vector< T > &x, T v)
 
template<typename T >
std::vector< T > & operator<< (std::vector< T > &x, const std::vector< T > &v)
 

Function Documentation

bool contains ( std::string  x,
char  v 
)

Definition at line 53 of file utils.cpp.

template<typename Container , typename Key >
bool contains ( Container  x,
Key  k 
)

Definition at line 26 of file utils.h.

template<typename Value >
bool contains ( std::vector< Value >  x,
Value  v 
)

Definition at line 31 of file utils.h.

template<typename Container , typename Key >
bool contains_ci ( Container  x,
Key  s 
)

Definition at line 60 of file utils.h.

template<typename Container , typename Value >
void erase ( Container &  x,
Value  v 
)

Definition at line 36 of file utils.h.

template<typename Container >
void erase_ci ( Container &  x,
const std::string &  s 
)

Definition at line 65 of file utils.h.

std::vector<std::string>::iterator find_ci ( std::vector< std::string > &  v,
const std::string &  s 
)

Definition at line 88 of file utils.cpp.

template<typename Value >
std::map<std::string,Value>::iterator find_ci ( std::map< std::string, Value > &  m,
const std::string &  s 
)

Definition at line 48 of file utils.h.

template<typename Container >
std::string join ( Container  c,
std::string  s 
)

Definition at line 76 of file utils.h.

std::vector<std::string>& operator<< ( std::vector< std::string > &  x,
const char *  v 
)

Definition at line 83 of file utils.cpp.

template<typename T >
std::vector<T>& operator<< ( std::vector< T > &  x,
v 
)

Definition at line 91 of file utils.h.

template<typename T >
std::vector<T>& operator<< ( std::vector< T > &  x,
const std::vector< T > &  v 
)

Definition at line 97 of file utils.h.

std::vector<std::string> split ( const std::string &  s,
const std::string &  sep 
)

Definition at line 65 of file utils.cpp.

bool startsWith ( std::string  x,
std::string  y,
bool  caseInsensitive 
)

Definition at line 57 of file utils.cpp.

std::string strToIdentifier ( const std::string &  f)

Definition at line 26 of file utils.cpp.

std::string strToLower ( const std::string &  f)

Definition at line 8 of file utils.cpp.

std::string strToUpper ( const std::string &  f)

Definition at line 17 of file utils.cpp.

template<typename Container , typename Value >
Value takeFirst ( Container  c)

Definition at line 41 of file utils.h.

std::string trim ( const std::string &  s)

Definition at line 36 of file utils.cpp.