16 #error no need to expose this header to Swig
20 #ifndef BORNAGAIN_FIT_TOOLS_STRINGUTILS_H
21 #define BORNAGAIN_FIT_TOOLS_STRINGUTILS_H
33 bool matchesPattern(
const std::string& text,
const std::string& wildcardPattern);
36 std::vector<std::string>
split(
const std::string& text,
const std::string& delimeter);
39 template <
typename T> std::string
scientific(
const T value,
int n = 10);
41 template <
typename T> std::string
scientific(
const T value,
int n)
43 std::ostringstream out;
Utility functions to analyze or modify strings.
std::vector< std::string > split(const std::string &text, const std::string &delimeter)
Split string into vector of string using delimeter.
std::string scientific(const T value, int n=10)
Returns scientific string representing given value of any numeric type.
bool matchesPattern(const std::string &text, const std::string &wildcardPattern)
Returns true if text matches pattern with wildcards '*' and '?'.