49 out.resize(
s.size() + (prefix ? 1 : 0));
51 std::string::size_type len = 0;
56 for (
auto iter =
s.cbegin(); iter !=
s.cend(); ++iter)
62 if (!len && prefix &&
isdigit(c))
85 std::string::size_type len = (last - first) + (prefix ? 1 : 0);
90 for (len=0; first != last; ++first)
92 const char c = *first;
96 if (!len && prefix &&
isdigit(c))
121 word camelCase(a +
b);
122 camelCase[a.size()] = char(toupper(
b[0]));
140 std::ostringstream buf;
141 buf.setf(std::ios_base::hex, std::ios_base::basefield);
144 buf << uintptr_t(ptr);
146 return word(buf.str(),
false);
A class for handling words, derived from Foam::string.
static word validate(const std::string &s, const bool prefix=false)
Construct validated word (no invalid characters).
static const word null
An empty word.
word()=default
Default construct.
static bool valid(char c)
Is this character valid for a word?
static int debug
Debugging.
static const char *const typeName
The typeName.
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))
int debugSwitch(const char *name, const int deflt=0)
Lookup debug switch or add default value.
tmp< GeometricField< Type, faPatchField, areaMesh > > operator&(const faMatrix< Type > &, const DimensionedField< Type, areaMesh > &)
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
constexpr bool isdigit(char c) noexcept
Test for digits [0-9] (C-locale only).