9 #ifndef CT_STRINGUTILS_H
10 #define CT_STRINGUTILS_H
27 const std::string& sep=
", ");
60 const std::vector<std::string>& names=std::vector<std::string>());
70 int intValue(
const std::string& val);
79 doublereal
fpValue(
const std::string& val);
117 std::string
parseSpeciesName(
const std::string& nameStr, std::string& phaseName);
129 doublereal
strSItoDbl(
const std::string& strSI);
143 std::vector<std::string>& v);
151 size_t copyString(
const std::string& source,
char* dest,
size_t length);
157 std::string
trimCopy(
const std::string &input);
This file contains definitions of terms that are used in internal routines and are unlikely to need m...
Wrapper for either system-installed or local headers for fmt.
std::vector< double > vector_fp
Turn on the use of stl vectors for the basic array type within cantera Vector of doubles.
std::map< std::string, double > compositionMap
Map connecting a string name with a double.
Namespace for the Cantera kernel.
int intValue(const std::string &val)
Translate a string into one integer value.
doublereal fpValue(const std::string &val)
Translate a string into one doublereal value.
bool caseInsensitiveEquals(const std::string &input, const std::string &test)
Case insensitive equality predicate.
std::string vec2str(const vector_fp &v, const std::string &fmt, const std::string &sep)
Convert a vector to a string (separated by commas)
std::string trimCopy(const std::string &input)
Trim.
size_t copyString(const std::string &source, char *dest, size_t length)
Copy the contents of a std::string into a char array of a given length.
std::string toLowerCopy(const std::string &input)
Convert to lower case.
std::string parseSpeciesName(const std::string &nameStr, std::string &phaseName)
Parse a name string, separating out the phase name from the species name.
doublereal fpValueCheck(const std::string &val)
Translate a string into one doublereal value, with error checking.
doublereal strSItoDbl(const std::string &strSI)
Interpret one or two token string as a single double.
void tokenizeString(const std::string &in_val, std::vector< std::string > &v)
This function separates a string up into tokens according to the location of white space.
std::string stripnonprint(const std::string &s)
Strip non-printing characters wherever they are.
compositionMap parseCompString(const std::string &ss, const std::vector< std::string > &names)
Parse a composition string into a map consisting of individual key:composition pairs.
Versions 6.2.0 and 6.2.1 of fmtlib do not include this define before they include windows....