1 #ifndef _RHEOLEF_SCATCH_ICC
2 #define _RHEOLEF_SCATCH_ICC
37 sprintf (buffer,
"%d",
int(i));
45 if (stat(filename.c_str(), &s) != 0) {
52 scatch (istream& in,
const string& ch,
bool full_match)
55 unsigned int l = ch.length();
56 if (l == 0)
return true;
60 unsigned int state = 0;
61 const char *
p = ch.c_str();
77 }
else if (state != 0 && ch[0] ==
c) {
81 }
else if (state != 0) {
87 while (state < l && in.get(
c) && in.good());
89 if (!full_match)
return (state == l);
90 if (state != l)
return false;
94 if (!
c || !in.good())
return true;
95 if (isspace(
c))
return true;
field::size_type size_type
This file is part of Rheolef.
bool scatch(std::istream &in, const std::string &ch, bool full_match=true)
scatch: see the rheostream page for the full documentation
std::string itos(std::string::size_type i)
itos: see the rheostream page for the full documentation
bool file_exists(const std::string &filename)
file_exists: see the rheostream page for the full documentation