10 #ifndef TEUCHOS_STRUTILS_H
11 #define TEUCHOS_STRUTILS_H
43 static bool readLine(std::istream& is, std::string& line);
52 static std::string reassembleFromTokens(
const Array<std::string>& tokens,
int iStart=0);
58 static int findNextWhitespace(
const std::string& str,
int offset);
61 static int findNextNonWhitespace(
const std::string& str,
int offset);
64 static std::string varSubstitute(
const std::string& rawLine,
65 const std::string& varName,
66 const std::string& varValue);
69 static std::string varTableSubstitute(
const std::string& rawLine,
75 static std::string before(
const std::string& str,
const std::string& sub);
79 static std::string before(
const std::string& str,
char sub);
83 static std::string after(
const std::string& str,
const std::string& sub);
87 static int find(
const std::string& str,
const std::string& sub);
90 static bool isWhite(
const std::string& str);
93 static std::string fixUnprintableCharacters(
const std::string& str);
96 static bool isNonWhite(
const std::string& str) {
return !isWhite(str);}
103 static std::string between(
const std::string& str,
const std::string& begin,
104 const std::string& end, std::string& front, std::string& back);
109 static std::string subString(
const std::string& str,
int begin,
int end);
111 static std::string readFromStream(std::istream& is);
114 static std::string allCaps(
const std::string& str);
117 static double atof(
const std::string& str);
120 static int atoi(
const std::string& str);
123 static std::ostream& printLines(
125 ,
const std::string &linePrefix
126 ,
const std::string &lines
130 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.