![]() |
OGS
|
|
Implementation of string helper functions.
Definition in file StringTools.cpp.
#include "StringTools.h"#include <algorithm>#include <boost/algorithm/string/replace.hpp>#include <chrono>#include <cstdarg>#include <cstdio>#include <iterator>#include <random>#include "Error.h"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) |
| void | BaseLib::trim (std::string &str, char ch) |
| void | BaseLib::simplify (std::string &str) |
| std::string | BaseLib::format (const char *format_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. | |