A class for handling words, derived from Foam::string. More...
Public Member Functions | |
word ()=default | |
word (const word &)=default | |
word (word &&w)=default | |
word (const string &s, bool doStrip=true) | |
word (string &&s, bool doStrip=true) | |
word (const std::string &s, bool doStrip=true) | |
word (std::string &&s, bool doStrip=true) | |
word (const char *s, bool doStrip=true) | |
word (const char *s, size_type len, bool doStrip) | |
word (Istream &is) | |
void | stripInvalid () |
word | lessExt () const |
word | ext () const |
word & | ext (const word &ending) |
word & | operator= (const word &s) |
word & | operator= (word &&s) |
word & | operator= (const string &s) |
word & | operator= (string &&s) |
word & | operator= (const std::string &s) |
word & | operator= (std::string &&s) |
word & | operator= (const char *s) |
template<class PrimitiveType > | |
Foam::word | printf (const char *fmt, const PrimitiveType &val) |
template<class PrimitiveType > | |
Foam::word | printf (const std::string &fmt, const PrimitiveType &val) |
bool | hasExt () const |
bool | hasExt (const char *ending) const |
bool | hasExt (const std::string &ending) const |
bool | hasExt (const wordRe &ending) const |
bool | removeExt () |
![]() | |
string ()=default | |
string (const std::string &str) | |
string (std::string &&str) | |
string (const char *str) | |
string (const char *str, const size_type len) | |
string (const char c) | |
string (const size_type len, const char c) | |
string (Istream &is) | |
bool | match (const std::string &text) const |
string & | replace (const std::string &s1, const std::string &s2, size_type pos=0) |
string & | replaceAll (const std::string &s1, const std::string &s2, size_type pos=0) |
string & | replaceAny (const std::string &s1, const char c2, size_type pos=0) |
string & | expand (const bool allowEmpty=false) |
bool | removeRepeated (const char character) |
bool | removeStart (const std::string &text) |
bool | removeStart (const char c) |
bool | removeEnd (const std::string &text) |
bool | removeEnd (const char c) |
void | swap (std::string &str) |
bool | operator() (const std::string &text) const |
bool | starts_with (const std::string &s) const |
bool | starts_with (const char c) const |
bool | ends_with (const std::string &s) const |
bool | ends_with (const char c) const |
size_type | count (const char c) const |
bool | startsWith (const std::string &s) const |
bool | endsWith (const std::string &s) const |
bool | removeTrailing (const char c) |
Static Public Member Functions | |
template<class PrimitiveType > | |
static word | printf (const char *fmt, const PrimitiveType &val) |
template<class PrimitiveType > | |
static word | printf (const std::string &fmt, const PrimitiveType &val) |
static bool | valid (char c) |
static word | validate (const std::string &s, const bool prefix=false) |
static word | validate (const char *first, const char *last, const bool prefix=false) |
![]() | |
template<class StringType > | |
static bool | valid (const std::string &str) |
template<class StringType > | |
static bool | stripInvalid (std::string &str) |
template<class StringType > | |
static StringType | validate (const std::string &str) |
Static Public Attributes | |
static const char *const | typeName = "word" |
static int | debug |
static const word | null |
![]() | |
static const char *const | typeName = "string" |
static int | debug |
static const string | null |
Additional Inherited Members | |
![]() | |
std::string::size_type | find_ext () const |
word | ext () const |
bool | ext (const word &ending) |
bool | hasPath () const |
bool | hasExt () const |
bool | hasExt (const char *ending) const |
bool | hasExt (const std::string &ending) const |
bool | hasExt (const wordRe &ending) const |
bool | removeExt () |
bool | removePath () |
![]() | |
static std::string::size_type | find_ext (const std::string &str) |
template<class PrimitiveType > | |
static std::string::size_type | string_printf (std::string &output, const char *fmt, const PrimitiveType &val) |
template<class PrimitiveType > | |
static std::string::size_type | string_printf (std::string &output, const std::string &fmt, const PrimitiveType &val) |
A class for handling words, derived from Foam::string.
A word is a string of characters without whitespace, quotes, slashes, semicolons or brace brackets. Words are delimited by whitespace.
|
default |
Definition at line 69 of file wordI.H.
References word::stripInvalid().
Definition at line 80 of file wordI.H.
References word::stripInvalid().
Definition at line 102 of file wordI.H.
References word::stripInvalid().
Definition at line 91 of file wordI.H.
References word::stripInvalid().
Definition at line 113 of file wordI.H.
References word::stripInvalid().
Definition at line 124 of file wordI.H.
References word::stripInvalid().
|
inlinestatic |
Referenced by isoSurfaceTopo::isoSurfaceTopo(), dataCloud::write(), ensightCase::write(), vtkCloud::write(), vtkWrite::write(), ensightWriter::writeCollated(), and isoAdvection::writeIsoFaces().
|
inlinestatic |
|
inlinestatic |
Definition at line 52 of file wordI.H.
References Foam::constant::universal::c, and Foam::isspace().
Referenced by cyclicAMIPolyPatch::cyclicAMIPolyPatch(), cyclicPolyPatch::cyclicPolyPatch(), ISstream::read(), VarName::valid(), keyType::valid(), wordRe::valid(), and word::validate().
|
static |
Definition at line 38 of file word.C.
References Foam::constant::universal::c, s, and word::valid().
Referenced by exprDriver::addVariables(), fvExprDriver::evaluateVariableRemote(), STLAsciiParseManual::execute(), Foam::getStopAction(), entry::New(), Foam::operator>>(), NASedgeFormat::read(), OBJedgeFormat::read(), functionObjectList::readFunctionObject(), STARCDsurfaceFormatCore::readInpCellTable(), FIREMeshReader::readSelections(), and ABAQUSCore::readHelper::readSurfaceElements().
|
static |
Definition at line 71 of file word.C.
References Foam::constant::universal::c, and word::valid().
|
inline |
Definition at line 137 of file wordI.H.
References Foam::expressions::patchExpr::debug, Foam::endl(), and Foam::exit().
Referenced by word::word().
Foam::word lessExt | ( | ) | const |
Definition at line 106 of file word.C.
Referenced by edgeMesh::canRead(), UnsortedMeshedSurface< Face >::canRead(), MeshedSurface< Foam::face >::canRead(), triSurface::canRead(), extendedEdgeMesh::canRead(), IOobject::member(), edgeMesh::New(), UnsortedMeshedSurface< Face >::New(), MeshedSurface< Foam::face >::New(), extendedEdgeMesh::New(), triSurface::New(), edgeMesh::read(), extendedEdgeMesh::read(), and Foam::readDir().
Foam::word ext | ( | ) | const |
Definition at line 119 of file word.C.
References string::ext().
Referenced by edgeMesh::canRead(), UnsortedMeshedSurface< Face >::canRead(), MeshedSurface< Foam::face >::canRead(), triSurface::canRead(), extendedEdgeMesh::canRead(), fileWriter::ext(), dlLibraryTable::fullname(), IOobject::group(), edgeMesh::New(), UnsortedMeshedSurface< Face >::New(), MeshedSurface< Foam::face >::New(), extendedEdgeMesh::New(), triSurface::New(), edgeMesh::read(), extendedEdgeMesh::read(), edgeMesh::write(), surfMesh::write(), and triSurface::write().
Foam::word & ext | ( | const word & | ending | ) |
Definition at line 125 of file word.C.
References string::ext().
|
inline |
Definition at line 159 of file wordI.H.
References Foam::FieldOps::assign(), and s.
|
inline |
Definition at line 170 of file wordI.H.
References Foam::FieldOps::assign(), and s.
|
inline |
Definition at line 181 of file wordI.H.
References Foam::FieldOps::assign(), and s.
|
inline |
Definition at line 189 of file wordI.H.
References Foam::FieldOps::assign(), and s.
|
inline |
Definition at line 197 of file wordI.H.
References Foam::FieldOps::assign(), and s.
|
inline |
Definition at line 205 of file wordI.H.
References Foam::FieldOps::assign(), and s.
|
inline |
Definition at line 213 of file wordI.H.
References Foam::FieldOps::assign(), and s.
|
inline |
Definition at line 28 of file wordI.H.
References Foam::output().
|
inline |
Definition at line 41 of file wordI.H.
References Foam::output().
|
inline |
Definition at line 49 of file stringI.H.
Referenced by Foam::readDir().
|
static |
Definition at line 75 of file word.H.
Referenced by keyType::setType(), keyType::uncompile(), and wordRe::uncompile().
|
static |
Definition at line 78 of file word.H.
Referenced by surfaceZonesInfo::addCellZonesToMesh(), FIREMeshReader::addPatches(), vtmWriter::append(), minMaxCondition::apply(), interfaceEntry::canonicalName(), surfaceFormatsCore::checkFile(), fluxSummary::checkFlowType(), externalCoupled::compositeName(), pointPatch::constraintType(), pointPatchField< Type >::constraintType(), cyclicAMIPolyPatch::cyclicAMIPolyPatch(), cyclicPolyPatch::cyclicPolyPatch(), STLAsciiParseManual::execute(), fileOperation::exists(), masterUncollatedFileOperation::exists(), string::ext(), faMesh::faMesh(), fvExpressionField::fieldName(), Foam::filteredName(), surfaceFormatsCore::findFile(), boundaryRegion::findIndex(), cellTable::findIndex(), Time::findInstancePath(), topoSet::findIOobject(), fvExprDriver::getFieldClassName(), IOobject::group(), Foam::interpolate(), CloudSubModelBase< CloudType >::localPath(), subModelBase::localPath(), polyTopoChange::makeMesh(), displacementMotionSolverMeshMover::move(), basicSolidChemistryModel::New(), coordinateSystem::New(), collatedFileOperation::objectPath(), properties::objectResultType(), orderedPhasePair::otherName(), cyclicAMIPolyPatch::periodicPatchID(), liquidFilmBase::pg(), rawIOField< Type >::rawIOField(), decomposedBlockData::read(), regionFunctionObject::read(), rigidBodyMotion::read(), MRFZone::read(), BilgerMixtureFraction::read(), sampledSurfaces::read(), fileOperation::readObjects(), masterUncollatedFileOperation::readObjects(), reference::reference(), surfaceFormatsCore::relativeFilePath(), rotatingPressureInletOutletVelocityFvPatchVectorField::rotatingPressureInletOutletVelocityFvPatchVectorField(), sizeDistribution::setCellZoneCells(), forces::setCoordinateSystem(), sensitivitySurfacePoints::setSuffixName(), sensitivitySurface::setSuffixName(), triSurface::triSurface(), triSurfaceMesh::triSurfaceMesh(), nutWallFunctionFvPatchScalarField::U(), token::wordToken(), surfaceSlipDisplacementPointPatchVectorField::write(), surfaceDisplacementPointPatchVectorField::write(), vtkWrite::write(), cyclicAMIPolyPatch::write(), mappedPatchBase::write(), nutWallFunctionFvPatchScalarField::writeLocalEntries(), Foam::writeMeshObject(), and NURBS3DSurface::writeVTK().
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.