BornAgain
1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
|
Defines a few helper functions. More...
Go to the source code of this file.
Namespaces | |
StringUtils | |
Utility functions to analyze or modify strings. | |
Macros | |
#define | BORNAGAIN_BASE_UTILS_STRINGUTILS_H |
Functions | |
std::string | StringUtils::join (const std::vector< std::string > &joinable, const std::string &joint) |
Returns string obtain by joining vector elements. More... | |
bool | StringUtils::matchesPattern (const std::string &text, const std::string &wildcardPattern) |
Returns true if text matches pattern with wildcards '*' and '?'. More... | |
std::string | StringUtils::padRight (const std::string &name, size_t length) |
Returns string right-padded with blanks. More... | |
std::string | StringUtils::removeSubstring (const std::string &text, const std::string &substr) |
Removes multiple occurrences of given substring from a string and returns result. More... | |
void | StringUtils::replaceItemsFromString (std::string &text, const std::vector< std::string > &items, const std::string &replacement="") |
Replaces all occurrences of items from string text with delimiter. More... | |
template<typename T > | |
std::string | StringUtils::scientific (const T value, int n=10) |
Returns scientific string representing given value of any numeric type. More... | |
std::vector< std::string > | StringUtils::split (const std::string &text, const std::string &delimeter) |
Split string into vector of string using delimeter. More... | |
std::string | StringUtils::to_lower (std::string text) |
Returns new string which is lower case of text. More... | |
std::string | StringUtils::trim (const std::string &str, const std::string &whitespace=" \t") |
Cuts any of the chars given in whitespace from start and end of str. More... | |
Defines a few helper functions.
Definition in file StringUtils.h.
#define BORNAGAIN_BASE_UTILS_STRINGUTILS_H |
Definition at line 21 of file StringUtils.h.