OGS 6.2.1-599-g427777a38.dirty.20191113164234
StringTools.h File Reference

Detailed Description

Definition of string helper functions.

Author
Thomas Fischer
Date
2010-06-16

Definition in file StringTools.h.

#include <string>
#include <list>
#include <sstream>
#include <vector>
Include dependency graph for StringTools.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 BaseLib
 Functionality to build different search length algorithm objects from given config.
 

Functions

std::vector< std::string > BaseLib::splitString (std::string const &str)
 
std::list< std::string > BaseLib::splitString (const std::string &str, char delim)
 
std::string BaseLib::replaceString (const std::string &searchString, const std::string &replaceString, std::string stringToReplace)
 
template<typename T >
BaseLib::str2number (const std::string &str)
 
void BaseLib::trim (std::string &str, char ch)
 
void BaseLib::simplify (std::string &str)
 
std::string BaseLib::padLeft (std::string const &str, int maxlen, char ch)
 
template<typename T >
std::string BaseLib::tostring (T const &value)
 Method for handling conversion to string uniformly across all types and std::string; see std::string overload below. More...
 
std::string const & BaseLib::tostring (std::string const &value)
 
std::string BaseLib::format (const char *format_string,...)
 returns printf-like formatted string More...