33 template<
class PrimitiveType>
37 const PrimitiveType& val
46 template<
class PrimitiveType>
49 const std::string& fmt,
50 const PrimitiveType& val
54 string_printf(
output, fmt, val);
147 if (
debug && string::stripInvalid<word>(*
this))
150 <<
"word::stripInvalid() called for word " 156 <<
" For debug level (= " <<
debug 157 <<
") > 1 this is considered fatal" <<
std::endl;
201 const auto i = find_ext();
203 if (i == std::string::npos)
word()=default
Default construct.
errorManipArg< error, int > exit(error &err, const int errNo=1)
static std::string::size_type string_printf(std::string &output, const char *fmt, const PrimitiveType &val)
A printf-style formatter for a primitive.
Ostream & endl(Ostream &os)
Add newline and flush stream.
word ext() const
Return file name extension (part after last .)
word & operator=(const word &s)
Copy assignment, no character validation required.
A class for handling words, derived from Foam::string.
word ext() const
Return file name extension (part after last .)
word lessExt() const
Return word without extension (part before last .)
void stripInvalid()
Strip invalid characters from this word.
graph_traits< Graph >::vertices_size_type size_type
static bool valid(char c)
Is this character valid for a word?
static word printf(const char *fmt, const PrimitiveType &val)
Use a printf-style formatter for a primitive.
void assign(Field< Tout > &result, const Field< T1 > &a, const UnaryOp &op)
Populate a field as the result of a unary operation on an input.
int debug
Static debugging option.
const dimensionedScalar c
Speed of light in a vacuum.
bool isspace(char c) noexcept
Test for whitespace (C-locale)
static Ostream & output(Ostream &os, const IntRange< T > &range)
word & replace_ext(const word &ending)
Remove extension (if any) and append a new one.
gmvFile<< "tracers "<< particles.size()<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().x()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().y()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().z()<< " ";}gmvFile<< nl;forAll(lagrangianScalarNames, i){ word name=lagrangianScalarNames[i];IOField< scalar > s(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
A class for handling character strings derived from std::string.
bool remove_ext()
Remove extension, return true if string changed.