OGS
|
Definition of string helper functions.
Definition in file StringTools.h.
#include <cstddef>
#include <list>
#include <sstream>
#include <string>
#include <vector>
Go to the source code of this file.
Namespaces | |
namespace | 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 > | |
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. | |
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. | |