A class for handling words, derived from string. More...


Public Member Functions | |
| word () | |
| Construct null. More... | |
| word (const word &) | |
| Copy constructor. More... | |
| word (const char *, const bool doStripInvalid=true) | |
| Copy constructor of character array. More... | |
| word (const char *, const size_type, const bool doStripInvalid) | |
| Copy constructor with a maximum number of characters. More... | |
| word (const string &, const bool doStripInvalid=true) | |
| Copy constructor of string. More... | |
| word (const std::string &, const bool doStripInvalid=true) | |
| Copy constructor of std::string. More... | |
| word (Istream &) | |
| Construct from Istream. More... | |
| word | capitalise () const |
| Return the word with the first letter capitalised. More... | |
| void | operator= (const word &) |
| void | operator= (const string &) |
| void | operator= (const std::string &) |
| void | operator= (const char *) |
Public Member Functions inherited from string | |
| string () | |
| Construct null. More... | |
| string (const std::string &) | |
| Construct from std::string. More... | |
| string (const string &) | |
| Copy constructor. More... | |
| string (string &&) | |
| Move constructor. More... | |
| string (const char *) | |
| Construct as copy of character array. More... | |
| string (const UList< char > &) | |
| Construct as copy of UList of character. More... | |
| string (const char *, const size_type) | |
| Construct as copy of specified number of characters. More... | |
| string (const char) | |
| Construct from a single character. More... | |
| string (const size_type, const char) | |
| Construct from copies of a single character. More... | |
| string (Istream &) | |
| Construct from Istream. More... | |
| size_type | count (const char) const |
| Count and return the number of a given character in the string. More... | |
| bool | match (const std::string &) const |
| True when strings match literally. More... | |
| string & | replace (const string &oldStr, const string &newStr, size_type start=0) |
| In this string replace first occurrence of sub-string oldStr. More... | |
| string | replace (const string &oldStr, const string &newStr, size_type start=0) const |
| Replace first occurrence of sub-string oldStr with newStr. More... | |
| string & | replaceAll (const string &oldStr, const string &newStr, size_type start=0) |
| In this string replace all occurrences of sub-string oldStr. More... | |
| string | replaceAll (const string &oldStr, const string &newStr, size_type start=0) const |
| Replace all occurrences of sub-string oldStr with newStr. More... | |
| string & | expand (const bool allowEmpty=false) |
| Expand initial tildes and all occurrences of environment variables. More... | |
| bool | remove (const char) |
| Remove all occurrences of character returning true if string changed. More... | |
| string | remove (const char) const |
| Remove all occurrences of character and return the string. More... | |
| bool | removeRepeated (const char) |
| Remove repeated character returning true if string changed. More... | |
| string | removeRepeated (const char) const |
| Remove repeated character and return the string. More... | |
| bool | removeTrailing (const char) |
| Remove trailing character returning true if string changed. More... | |
| string | removeTrailing (const char) const |
| Return string with trailing character removed. More... | |
| bool | removeTrailing (const string &) |
| Remove trailing string returning true if string changed. More... | |
| string | removeTrailing (const string &) const |
| Return string with trailing string removed. More... | |
| void | strip (const string &) |
| Strip characters from the start and end of the string. More... | |
| size_type | findClosing (const char, const size_type) const |
| Find the closing character. Brackets counting algorithm. The. More... | |
| string | operator() (const size_type i, const size_type n) const |
| Return the sub-string from the i-th character for n characters. More... | |
| string | operator() (const size_type n) const |
| Return the sub-string from the first character for n characters. More... | |
| void | operator= (const string &) |
| void | operator= (string &&) |
| template<class String > | |
| Foam::string | quotemeta (const string &str, const char quote) |
Static Public Member Functions | |
| static bool | valid (char) |
| Is this character valid for a word. More... | |
Static Public Member Functions inherited from string | |
| template<class String > | |
| static bool | valid (const string &) |
| Is this string type valid? More... | |
| template<class String > | |
| static bool | meta (const string &, const char quote='\\') |
| Does this string have particular meta-characters? More... | |
| template<class String > | |
| static bool | stripInvalid (string &) |
| Strip invalid characters from the given string. More... | |
| template<class String > | |
| static String | validate (const string &) |
| Return a valid String from the given string. More... | |
| template<class String > | |
| static string | quotemeta (const string &, const char quote='\\') |
| Return a String with quoted meta-characters from the given string. More... | |
Static Public Attributes | |
| static const char *const | typeName = "word" |
| static int | debug |
| static const word | null |
| An empty word. More... | |
Static Public Attributes inherited from string | |
| static const char *const | typeName = "string" |
| static int | debug |
| static const string | null |
| An empty string. More... | |
Friends | |
| word | operator& (const word &, const word &) |
| Istream & | operator>> (Istream &, word &) |
| Ostream & | operator<< (Ostream &, const word &) |
A class for handling words, derived from string.
A word is a string of characters without whitespace, quotes, slashes, semicolons or brace brackets. Words are delimited by whitespace.
|
inline |
|
inline |
|
inlinestatic |
Is this character valid for a word.
Definition at line 115 of file wordI.H.
References Foam::constant::universal::c, and Foam::isspace().
Referenced by ISstream::read().


|
inline |
Return the word with the first letter capitalised.
Definition at line 131 of file wordI.H.
Referenced by fractal::correct(), cellsToCells::distributeMesh(), massDiffusionLimitedPhaseChange::massDiffusionLimitedPhaseChange(), massDiffusionLimitedPhaseChange::mDot(), cellsToCells::trimLocalTgt(), FacePatchIntersection< SrcPatchType, TgtPatchType >::type(), polyPatchIntersection::type(), primitivePatchIntersection::type(), and TriPatchIntersection< SrcPatchType, TgtPatchType >::type().

|
inline |
Definition at line 141 of file wordI.H.
References string::operator=().
Referenced by keyType::operator=(), functionName::operator=(), and wordRe::operator=().


|
inline |
Definition at line 147 of file wordI.H.
References string::operator=().

|
inline |
Definition at line 154 of file wordI.H.
References string::operator=().

|
inline |
Definition at line 161 of file wordI.H.
References string::operator=().

|
static |
Definition at line 73 of file word.H.
Referenced by token::wordToken().
|
static |
Definition at line 74 of file word.H.
Referenced by wordRe::uncompile().
|
static |
An empty word.
Definition at line 77 of file word.H.
Referenced by surfaceZonesInfo::addCellZonesToMesh(), fvTotalSource::addsSupToField(), massTransfer::addsSupToField(), massTransfer::addSupType(), forcesBase::alpha(), kinematicParcel::calculate(), limitTemperature::constrainedFields(), Maxwell< BasicMomentumTransportModel >::correct(), cutPolyIsoSurface::cutPolyIsoSurface(), cyclicPolyPatch::cyclicPolyPatch(), forcesBase::devTau(), dimensioned< Type >::dimensioned(), cellsToCells::distributeMesh(), fileName::ext(), fvModel::fieldName(), cutLayerAverage::fields(), patchCutLayerAverage::fields(), masterUncollatedFileOperation::filePathInfo(), Foam::findConfigFile(), boundaryRegion::findIndex(), cellTable::findIndex(), Time::findInstancePath(), masterUncollatedFileOperation::findInstancePath(), polyMesh::found(), IOobject::group(), IOobject::groupName(), basicThermo::heBoundaryBaseTypes(), main(), externalTemperatureFvPatchScalarField::map(), adjustTimeStepToNucleation::maxDeltaT(), MRFPatchField::MRFzone(), forcesBase::mu(), MultiRegionRefs< Region >::MultiRegionRefs(), phaseInterface::namePartsToName(), phaseInterface::nameToNameParts(), functionObjectList::New(), basicChemistryModel::New(), phaseInterface::New(), LagrangianPatchField< Type >::New(), collatedFileOperation::objectPath(), phaseInterface::oldNamePartsToName(), LagrangianEqn< Type >::op(), Foam::operator>>(), phaseScalarTransport::phaseScalarTransport(), phaseSystem::phaseSystem(), coordSet::pointName(), polyPatch::polyPatch(), populationBalanceSetSizeDistribution::populationBalanceSetSizeDistribution(), adjustTimeStepToNucleation::read(), wallBoilingProperty::read(), adjustTimeStepToCombustion::read(), Qdot::read(), cutLayerAverage::read(), patchCutLayerAverage::read(), shearStress::read(), totalEnthalpy::read(), turbulenceFields::read(), wallHeatFlux::read(), wallShearStress::read(), forcesBase::read(), adjustTimeStepToChemistry::read(), dynamicCodeContext::read(), propellerDisk::readCoeffs(), Foam::readConfigFile(), fileOperation::readObjects(), masterUncollatedFileOperation::readObjects(), kinematicParcel::reCalculateModified(), parcel::reCalculateModified(), Foam::regionName(), nonConformalCoupledPolyPatch::rename(), nonConformalCoupledPolyPatch::reorder(), externalTemperatureFvPatchScalarField::reset(), sampledIsoSurfaceSurface::sampledIsoSurfaceSurface(), coordSet::scalarName(), phaseInterface::separator(), setFaceFieldType(), sampledSet::setSamples(), phaseSystem::solve(), LagrangianModels::source(), dictionary::topDictKeyword(), cellsToCells::trimLocalTgt(), flowRateInletVelocityFvPatchVectorField::updateCoeffs(), externalTemperatureFvPatchScalarField::updateCoeffs(), token::wordToken(), populationBalanceSetSizeDistribution::write(), cutLayerAverage::write(), layerAverage::write(), patchCutLayerAverage::write(), streamlines::write(), gnuplotSetWriter::write(), alphatBoilingWallFunctionFvPatchScalarField::write(), MRFPatchField::write(), flowRateInletVelocityFvPatchVectorField::write(), surfaceDisplacementPointPatchVectorField::write(), surfaceSlipDisplacementPointPatchVectorField::write(), mappedPatchBaseBase::write(), externalTemperatureFvPatchScalarField::write(), and Foam::writeMeshObject().