33template<
class PrimitiveType>
37 const PrimitiveType& val
46template<
class PrimitiveType>
49 const std::string& fmt,
50 const PrimitiveType& val
150 <<
"word::stripInvalid() called for word "
151 << this->c_str() << std::endl;
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)
230 assign(std::move(
s));
246 assign(std::move(
s));
262 assign(std::move(
s));
graph_traits< Graph >::vertices_size_type size_type
A class for handling character strings derived from std::string.
bool remove_ext()
Remove extension, return true if string changed.
string()=default
Default construct.
static bool stripInvalid(std::string &str)
Strip invalid characters from the given string.
word ext() const
Return file name extension (part after last .).
static std::string::size_type string_printf(std::string &output, const char *fmt, const PrimitiveType &val)
A printf-style formatter for a primitive.
static std::string::size_type find_ext(const std::string &str)
Find position of a file extension dot, return npos on failure.
A class for handling words, derived from Foam::string.
static word printf(const char *fmt, const PrimitiveType &val)
Use a printf-style formatter for a primitive.
word & replace_ext(const word &ending)
Remove extension (if any) and append a new one.
word()=default
Default construct.
static bool valid(char c)
Is this character valid for a word?
word ext() const
Return file name extension (part after last .).
word & operator=(const word &s)
Copy assignment, no character validation required.
static int debug
Debugging.
void stripInvalid()
Strip invalid characters from this word.
word lessExt() const
Return word without extension (part before last .).
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))
constexpr bool isspace(char c) noexcept
Test for whitespace (C-locale only).