42 #ifndef TEUCHOS_STRUTILS_H
43 #define TEUCHOS_STRUTILS_H
75 static bool readLine(std::istream& is, std::string& line);
84 static std::string reassembleFromTokens(
const Array<std::string>& tokens,
int iStart=0);
90 static int findNextWhitespace(
const std::string& str,
int offset);
93 static int findNextNonWhitespace(
const std::string& str,
int offset);
96 static std::string varSubstitute(
const std::string& rawLine,
97 const std::string& varName,
98 const std::string& varValue);
101 static std::string varTableSubstitute(
const std::string& rawLine,
106 static std::string envSubstitute(
const std::string& line);
110 static std::string before(
const std::string& str,
const std::string& sub);
114 static std::string before(
const std::string& str,
char sub);
118 static std::string after(
const std::string& str,
const std::string& sub);
122 static int find(
const std::string& str,
const std::string& sub);
125 static bool isWhite(
const std::string& str);
128 static std::string fixUnprintableCharacters(
const std::string& str);
131 static bool isNonWhite(
const std::string& str) {
return !isWhite(str);}
138 static std::string between(
const std::string& str,
const std::string& begin,
139 const std::string& end, std::string& front, std::string& back);
144 static std::string subString(
const std::string& str,
int begin,
int end);
146 static std::string readFromStream(std::istream& is);
149 static std::string allCaps(
const std::string& str);
152 static double atof(
const std::string& str);
155 static int atoi(
const std::string& str);
158 static std::ostream& printLines(
160 ,
const std::string &linePrefix
161 ,
const std::string &lines
165 static std::string removeAllSpaces(std::string stringToClean);
Teuchos header file which uses auto-configuration information to include necessary C++ headers...
Provides std::string manipulation utilities that are not provided in the standard C++ std::string cla...
Templated array class derived from the STL std::vector.
static bool isNonWhite(const std::string &str)
Returns true if a std::string has any non-whitespace.
A utilities class for Teuchos.