10 #ifndef TEUCHOS_STRUTILS_H
11 #define TEUCHOS_STRUTILS_H
46 static bool readLine(std::istream& is, std::string& line);
55 static std::string reassembleFromTokens(
const Array<std::string>& tokens,
int iStart=0);
61 static int findNextWhitespace(
const std::string& str,
int offset);
64 static int findNextNonWhitespace(
const std::string& str,
int offset);
67 static std::string varSubstitute(
const std::string& rawLine,
68 const std::string& varName,
69 const std::string& varValue);
72 static std::string varTableSubstitute(
const std::string& rawLine,
78 static std::string before(
const std::string& str,
const std::string& sub);
82 static std::string before(
const std::string& str,
char sub);
86 static std::string after(
const std::string& str,
const std::string& sub);
90 static int find(
const std::string& str,
const std::string& sub);
93 static bool isWhite(
const std::string& str);
96 static std::string fixUnprintableCharacters(
const std::string& str);
99 static bool isNonWhite(
const std::string& str) {
return !isWhite(str);}
106 static std::string between(
const std::string& str,
const std::string& begin,
107 const std::string& end, std::string& front, std::string& back);
112 static std::string subString(
const std::string& str,
int begin,
int end);
114 static std::string readFromStream(std::istream& is);
117 static std::string allCaps(
const std::string& str);
120 static double atof(
const std::string& str);
123 static int atoi(
const std::string& str);
126 static std::ostream& printLines(
128 ,
const std::string &linePrefix
129 ,
const std::string &lines
133 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.