OGS
StringTools.h File Reference

Detailed Description

Definition of string helper functions.

Author
Thomas Fischer
Date
2010-06-16

Definition in file StringTools.h.

#include <list>
#include <sstream>
#include <string>
#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
 

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::randomString (std::size_t length)
 Returns a random string of the given length containing just a-z,A-Z,0-9. More...
 
std::string BaseLib::getUniqueName (std::vector< std::string > const &existing_names, std::string const &input_name)
 Append '-' and a number such that the name is unique. More...