43 #ifndef PANZER_STRING_UTILITIES_HPP 44 #define PANZER_STRING_UTILITIES_HPP 48 #include "Teuchos_RCP.hpp" 49 #include "Teuchos_ParameterList.hpp" 54 void trim(std::string& str);
58 const std::string& str,
59 const std::string delimiter =
",",
bool trim=
false);
70 template <
typename ScalarT>
73 return plist.get<
double>(
field);
void TokensToInts(std::vector< int > &values, const std::vector< std::string > &tokens)
Turn a vector of tokens into a vector of ints.
void trim(std::string &str)
Removes whitespace at beginning and end of string.
std::vector< ScalarT > values
void TokensToDoubles(std::vector< double > &values, const std::vector< std::string > &tokens)
Turn a vector of tokens into a vector of doubles.
PHX::MDField< const ScalarT, Cell, IP > field
ScalarT getScalarParameter(const std::string &field, const Teuchos::ParameterList &plist)
void StringTokenizer(std::vector< std::string > &tokens, const std::string &str, const std::string delimiters, bool trim)
Tokenize a string, put tokens in a vector.