Collection of static functions for various string-related operations. More...
Classes | |
| struct | natural_sort |
| Encapsulation of natural order sorting for algorithms. More... | |
Functions | |
| std::string::size_type | count (const std::string &s, const char c) |
| Count the number of occurrences of the specified character. More... | |
| std::string::size_type | count (const char *s, const char c) |
| Count the number of occurrences of the specified character. More... | |
| bool | match (const UList< wordRe > &patterns, const std::string &text) |
| Return true if text matches one of the regular expressions. More... | |
| string | expand (const std::string &s, const HashTable< string, word, string::hash > &mapping, const char sigil='$') |
| void | inplaceExpand (std::string &s, const HashTable< string, word, string::hash > &mapping, const char sigil='$') |
| void | inplaceExpand (std::string &s, const dictionary &dict, const bool allowEnv, const bool allowEmpty, const bool allowSubDict=false, const char sigil='$') |
| string | expand (const std::string &s, const dictionary &dict, const char sigil='$') |
| Expand occurrences of dictionary or environment variables. More... | |
| void | inplaceExpand (std::string &s, const dictionary &dict, const char sigil='$') |
| Inplace expand occurrences of dictionary or environment variables. More... | |
| string | expand (const std::string &s, const bool allowEmpty=false) |
| void | inplaceExpand (std::string &s, const bool allowEmpty=false) |
| bool | inplaceReplaceVar (std::string &s, const word &varName) |
| Replace environment variable contents with its name. More... | |
| std::pair< size_t, size_t > | findTrim (const std::string &s, size_t pos=0, size_t len=std::string::npos) |
| Find (first, last) non-space locations in string or sub-string. More... | |
| string | trimLeft (const std::string &s) |
| Return string trimmed of leading whitespace. More... | |
| void | inplaceTrimLeft (std::string &s) |
| Trim leading whitespace inplace. More... | |
| string | trimRight (const std::string &s) |
| Return string trimmed of trailing whitespace. More... | |
| void | inplaceTrimRight (std::string &s) |
| Trim trailing whitespace inplace. More... | |
| string | trim (const std::string &s) |
| Return string trimmed of leading and trailing whitespace. More... | |
| void | inplaceTrim (std::string &s) |
| Trim leading and trailing whitespace inplace. More... | |
| void | inplaceRemoveSpace (std::string &s) |
| Eliminate whitespace inplace. More... | |
| string | removeComments (const std::string &s) |
| Return string with C/C++ comments removed. More... | |
| void | inplaceRemoveComments (std::string &s) |
| Remove C/C++ comments inplace. More... | |
| string | lower (const std::string &s) |
| Return string copy transformed with std::tolower on each character. More... | |
| void | inplaceLower (std::string &s) |
| Inplace transform string with std::tolower on each character. More... | |
| string | upper (const std::string &s) |
| Return string copy transformed with std::toupper on each character. More... | |
| void | inplaceUpper (std::string &s) |
| Inplace transform string with std::toupper on each character. More... | |
| template<class StringType > | |
| Foam::SubStrings< StringType > | split (const StringType &str, const char delim, const bool keepEmpty=false) |
| Split string into sub-strings at the delimiter character. More... | |
| template<class StringType > | |
| Foam::SubStrings< StringType > | split (const StringType &str, const std::string &delim, const bool keepEmpty=false) |
| Split string into sub-strings using delimiter string. More... | |
| template<class StringType > | |
| Foam::SubStrings< StringType > | splitAny (const StringType &str, const std::string &delim) |
| Split string into sub-strings using any characters in delimiter. More... | |
| template<class StringType > | |
| Foam::SubStrings< StringType > | splitFixed (const StringType &str, const std::string::size_type width, const std::string::size_type start=0) |
| Split string into sub-strings using a fixed field width. More... | |
| template<class StringType > | |
| Foam::SubStrings< StringType > | splitSpace (const StringType &str) |
| Split string into sub-strings at whitespace (TAB, NL, VT, FF, CR, SPC) More... | |
| void | writeWrapped (OSstream &os, const std::string &str, const std::string::size_type width, const std::string::size_type indent=0, const bool escape=false) |
| Output string with text wrapping. More... | |
| string | evaluate (const std::string &s, size_t pos=0, size_t len=std::string::npos) |
| int | natstrcmp (const char *s1, const char *s2) |
| 'Natural' compare for C-strings More... | |
Collection of static functions for various string-related operations.
| std::string::size_type count | ( | const std::string & | s, |
| const char | c | ||
| ) |
Count the number of occurrences of the specified character.
Definition at line 699 of file stringOps.C.
References Foam::constant::universal::c, Foam::BitOps::count(), and s.
Referenced by string::count(), ensightSurfaceReader::replaceMask(), OSstream::write(), and OSstream::writeQuoted().
| std::string::size_type count | ( | const char * | s, |
| const char | c | ||
| ) |
Count the number of occurrences of the specified character.
Correctly handles nullptr.
Definition at line 708 of file stringOps.C.
References Foam::constant::universal::c, Foam::BitOps::count(), and s.
Return true if text matches one of the regular expressions.
Definition at line 75 of file stringOps.H.
Referenced by functionObjectList::execute(), degenerateMatcher::match(), wordRes::matching(), scalars::matching(), scalarRanges::operator()(), regExpPosix::operator()(), keyType::operator()(), regExpCxx::operator()(), scalarRange::operator()(), and wordRe::operator()().
| Foam::string expand | ( | const std::string & | s, |
| const HashTable< string, word, string::hash > & | mapping, | ||
| const char | sigil = '$' |
||
| ) |
Expand occurrences of variables according to the mapping and return the expanded string.
Definition at line 720 of file stringOps.C.
References inplaceExpand(), and s.
Referenced by dynamicCode::copyOrCreateFiles(), argList::displayDoc(), ifeqEntry::execute(), ifeqEntry::expand(), exprString::exprString(), functionObjectList::findDict(), and Foam::operator<<().
| void inplaceExpand | ( | std::string & | s, |
| const HashTable< string, word, string::hash > & | mapping, | ||
| const char | sigil = '$' |
||
| ) |
Inplace expand occurrences of variables according to the mapping. Does not use environment values.
Expansion includes:
$VAR ${VAR} ${parameter:-defValue} If parameter is unset or null, the defValue is substituted. Otherwise, the value of parameter is substituted.${parameter:+altValue} If parameter is unset or null, nothing is substituted. Otherwise the altValue is substituted.General behaviour:
| [in,out] | s | The string to modify inplace. |
| mapping | The lookup table | |
| sigil | The leading sigil. Can be changed to avoid conflict with other string expansions. (default: '$') |
Definition at line 733 of file stringOps.C.
References HashTable< T, Key, Hash >::cfind(), findParameterAlternative(), and s.
Referenced by dynamicCode::copyAndFilter(), expand(), ifeqEntry::expand(), expressionEntry::expand(), exprString::expand(), string::expand(), exprString::getExpression(), dynamicCodeContext::inplaceExpand(), exprString::inplaceExpand(), expressionEntry::inplaceExpand(), entry::New(), CodedSource< Type >::read(), includeEtcEntry::resolveEtcFile(), and includeEntry::resolveFile().
| void inplaceExpand | ( | std::string & | s, |
| const dictionary & | dict, | ||
| const bool | allowEnv, | ||
| const bool | allowEmpty, | ||
| const bool | allowSubDict = false, |
||
| const char | sigil = '$' |
||
| ) |
Inplace expand occurrences of variables according to the dictionary and (optionally) environment variables.
Expansion includes:
$VAR ${VAR} ${VAR:-defValue} ${VAR:+altValue} ${{EXPR}} $FOAM_CASE directory$FOAM_CASE/constant directory$FOAM_CASE/system directory${parameter:-defValue} If parameter is unset or null, the defValue is substituted. Otherwise, the value of parameter is substituted.${parameter:+altValue} If parameter is unset or null, nothing is substituted. Otherwise the altValue is substituted.General behaviour:
| [in,out] | s | The string to modify inplace |
| dict | The dictionary context for the expansion | |
| allowEnv | Allow use of environment values as fallback | |
| allowEmpty | Allow empty expansions, or treat as Fatal | |
| allowSubDict | Allow expansion of subDict entries as well as primitive entries (default: false) | |
| sigil | The leading sigil. Can be changed to avoid conflict with other string expansions. (default: '$') |
Definition at line 858 of file stringOps.C.
References dict, Foam::expandString(), and s.
| Foam::string expand | ( | const std::string & | s, |
| const dictionary & | dict, | ||
| const char | sigil = '$' |
||
| ) |
Expand occurrences of dictionary or environment variables.
Empty expansions are allowed. Serialization of subDict entries is permitted.
Definition at line 845 of file stringOps.C.
References dict, inplaceExpand(), and s.
| void inplaceExpand | ( | std::string & | s, |
| const dictionary & | dict, | ||
| const char | sigil = '$' |
||
| ) |
Inplace expand occurrences of dictionary or environment variables.
Empty expansions are allowed. Serialization of subDict entries is permitted.
Definition at line 872 of file stringOps.C.
References dict, Foam::expandString(), and s.
| Foam::string expand | ( | const std::string & | s, |
| const bool | allowEmpty = false |
||
| ) |
Expand initial tags, tildes, and all occurrences of environment variables.
Definition at line 885 of file stringOps.C.
References inplaceExpand(), and s.
| void inplaceExpand | ( | std::string & | s, |
| const bool | allowEmpty = false |
||
| ) |
Expand initial tags, tildes, and all occurrences of environment variables
The expansion behaviour is identical to stringOps::inplaceExpand (std::string&, const dictionary&, bool, bool, bool, char) except that there is no dictionary and the environment variables are always enabled.
Definition at line 897 of file stringOps.C.
References Foam::expandString(), and s.
Replace environment variable contents with its name.
This is essentially the inverse operation for inplaceExpand for a single element. Return true if a replacement was successful.
Definition at line 908 of file stringOps.C.
References Foam::getEnv(), and s.
| std::pair<size_t, size_t> Foam::stringOps::findTrim | ( | const std::string & | s, |
| size_t | pos = 0, |
||
| size_t | len = std::string::npos |
||
| ) |
Find (first, last) non-space locations in string or sub-string.
This may change to std::string_view in the future.
Referenced by evaluate().
| Foam::string trimLeft | ( | const std::string & | s | ) |
Return string trimmed of leading whitespace.
Definition at line 932 of file stringOps.C.
References stdFoam::end(), Foam::isspace(), Foam::pos(), and s.
| void inplaceTrimLeft | ( | std::string & | s | ) |
Trim leading whitespace inplace.
Definition at line 954 of file stringOps.C.
References stdFoam::end(), Foam::isspace(), Foam::pos(), and s.
Referenced by inplaceTrim().
| Foam::string trimRight | ( | const std::string & | s | ) |
Return string trimmed of trailing whitespace.
Definition at line 974 of file stringOps.C.
References stdFoam::end(), Foam::isspace(), and s.
| void inplaceTrimRight | ( | std::string & | s | ) |
Trim trailing whitespace inplace.
Definition at line 994 of file stringOps.C.
References stdFoam::end(), Foam::isspace(), and s.
Referenced by inplaceTrim(), and ensightSurfaceReader::readLine().
| Foam::string trim | ( | const std::string & | s | ) |
Return string trimmed of leading and trailing whitespace.
Definition at line 1048 of file stringOps.C.
References stdFoam::end(), Foam::isspace(), Foam::pos(), and s.
Referenced by exprDriver::addVariables(), bitSet::orEq(), and bitSet::xorEq().
| void inplaceTrim | ( | std::string & | s | ) |
Trim leading and trailing whitespace inplace.
Definition at line 1069 of file stringOps.C.
References inplaceTrimLeft(), inplaceTrimRight(), and s.
Referenced by exprDriver::addVariables(), dynamicCodeContext::inplaceExpand(), expressionEntry::inplaceExpand(), and Foam::recursiveExpand().
| void inplaceRemoveSpace | ( | std::string & | s | ) |
Eliminate whitespace inplace.
Definition at line 1076 of file stringOps.C.
References Foam::isspace(), and s.
Referenced by Foam::getIdentifier().
| Foam::string removeComments | ( | const std::string & | s | ) |
Return string with C/C++ comments removed.
Definition at line 1082 of file stringOps.C.
References inplaceRemoveComments(), and s.
Referenced by exprString::exprString().
| void inplaceRemoveComments | ( | std::string & | s | ) |
Remove C/C++ comments inplace.
Definition at line 1090 of file stringOps.C.
References Foam::constant::universal::c, Foam::isspace(), n, and s.
Referenced by exprString::inplaceExpand(), and removeComments().
| Foam::string lower | ( | const std::string & | s | ) |
Return string copy transformed with std::tolower on each character.
Definition at line 1186 of file stringOps.C.
References s, and Foam::transform().
Referenced by dynamicOversetFvMesh::addInterpolation(), LduMatrix< Type, DType, LUType >::Amul(), lduMatrix::Amul(), GAMGAgglomeration::checkRestriction(), STLAsciiParseManual::execute(), LduMatrix< Type, DType, LUType >::H(), labelRange::join(), FixedList< Type, 3 >::moveFirst(), UList< Foam::wordRe >::moveFirst(), LduMatrix< Type, DType, LUType >::operator*=(), lduMatrix::operator*=(), LduMatrix< Type, DType, LUType >::operator+=(), lduMatrix::operator+=(), LduMatrix< Type, DType, LUType >::operator-=(), lduMatrix::operator-=(), LduMatrix< Type, DType, LUType >::operator=(), lduMatrix::operator=(), labelRanges::remove(), LduMatrix< Type, DType, LUType >::residual(), lduMatrix::residual(), faMatrix< Type >::setValues(), fvMatrix< Type >::setValuesFromList(), fvMatrix< Type >::solveCoupled(), labelRange::subset(), labelRange::subset0(), LduMatrix< Type, DType, LUType >::sumA(), lduMatrix::sumA(), LduMatrix< Type, DType, LUType >::Tmul(), lduMatrix::Tmul(), lduPrimitiveMesh::upperTriOrder(), and dynamicOversetFvMesh::write().
| void inplaceLower | ( | std::string & | s | ) |
Inplace transform string with std::tolower on each character.
Definition at line 1196 of file stringOps.C.
References s, and Foam::transform().
Referenced by STARCDMeshReader::readBoundary().
| Foam::string upper | ( | const std::string & | s | ) |
Return string copy transformed with std::toupper on each character.
Definition at line 1202 of file stringOps.C.
References s, and Foam::transform().
Referenced by dynamicOversetFvMesh::addInterpolation(), ABAQUSCore::readHelper::addNewElset(), LduMatrix< Type, DType, LUType >::Amul(), lduMatrix::Amul(), GAMGAgglomeration::checkRestriction(), Foam::getIdentifier(), LduMatrix< Type, DType, LUType >::H(), labelRange::join(), Foam::lessThan(), FixedList< Type, 3 >::moveLast(), UList< Foam::wordRe >::moveLast(), LduMatrix< Type, DType, LUType >::operator*=(), lduMatrix::operator*=(), LduMatrix< Type, DType, LUType >::operator+=(), lduMatrix::operator+=(), LduMatrix< Type, DType, LUType >::operator-=(), lduMatrix::operator-=(), LduMatrix< Type, DType, LUType >::operator=(), lduMatrix::operator=(), argList::printMan(), ABAQUSCore::readHelper::read(), labelRanges::remove(), LduMatrix< Type, DType, LUType >::residual(), lduMatrix::residual(), faMatrix< Type >::setValues(), fvMatrix< Type >::setValuesFromList(), fvMatrix< Type >::solveCoupled(), labelRange::subset(), labelRange::subset0(), LduMatrix< Type, DType, LUType >::sumA(), lduMatrix::sumA(), FixedList< Type, 3 >::swapLast(), UList< Foam::wordRe >::swapLast(), LduMatrix< Type, DType, LUType >::Tmul(), lduMatrix::Tmul(), lduPrimitiveMesh::upperTriOrder(), and dynamicOversetFvMesh::write().
| void inplaceUpper | ( | std::string & | s | ) |
Inplace transform string with std::toupper on each character.
Definition at line 1212 of file stringOps.C.
References s, and Foam::transform().
| Foam::SubStrings< StringType > split | ( | const StringType & | str, |
| const char | delim, | ||
| const bool | keepEmpty = false |
||
| ) |
Split string into sub-strings at the delimiter character.
Empty sub-strings are normally suppressed. Behaviour is ill-defined if delim is a NUL character.
Definition at line 32 of file stringOpsTemplates.C.
References SubStrings< String >::append(), and stdFoam::end().
Referenced by dictionary::makeScopedDict().
| Foam::SubStrings< StringType > split | ( | const StringType & | str, |
| const std::string & | delim, | ||
| const bool | keepEmpty = false |
||
| ) |
Split string into sub-strings using delimiter string.
Empty sub-strings are normally suppressed.
Definition at line 68 of file stringOpsTemplates.C.
References SubStrings< String >::append(), and stdFoam::end().
| Foam::SubStrings< StringType > splitAny | ( | const StringType & | str, |
| const std::string & | delim | ||
| ) |
Split string into sub-strings using any characters in delimiter.
Empty sub-strings are normally suppressed. Behaviour is ill-defined if delim is an empty string.
Definition at line 104 of file stringOpsTemplates.C.
References SubStrings< String >::append(), stdFoam::end(), and Foam::pos().
Referenced by scalarRanges::parse(), and splitSpace().
| Foam::SubStrings< StringType > splitFixed | ( | const StringType & | str, |
| const std::string::size_type | width, | ||
| const std::string::size_type | start = 0 |
||
| ) |
Split string into sub-strings using a fixed field width.
Behaviour is ill-defined if width is zero.
| str | the string to be split |
| width | the fixed field width for each sub-string |
| start | the optional offset of where to start the splitting. Any text prior to start is ignored in the operation. |
Definition at line 145 of file stringOpsTemplates.C.
References SubStrings< String >::append(), stdFoam::end(), and Foam::pos().
| Foam::SubStrings< StringType > splitSpace | ( | const StringType & | str | ) |
Split string into sub-strings at whitespace (TAB, NL, VT, FF, CR, SPC)
Empty sub-strings are suppressed.
Definition at line 180 of file stringOpsTemplates.C.
References splitAny().
Referenced by argList::displayDoc(), OBJsurfaceFormat< Face >::read(), OBJedgeFormat::read(), and ensightSurfaceReader::readCase().
| void writeWrapped | ( | OSstream & | os, |
| const std::string & | str, | ||
| const std::string::size_type | width, | ||
| const std::string::size_type | indent = 0, |
||
| const bool | escape = false |
||
| ) |
Output string with text wrapping.
Always includes a trailing newline, unless the string itself is empty.
| os | the output stream |
| str | the text to be output |
| width | the max-width before wrapping |
| indent | indentation for continued lines |
| escape | escape any backslashes on output |
Definition at line 1219 of file stringOps.C.
References Foam::constant::universal::c, stdFoam::end(), Foam::indent(), Foam::isspace(), Foam::nl, and Foam::pos().
Referenced by argList::printMan(), Foam::printManOption(), argList::printNotes(), and Foam::printOptionUsage().
| Foam::string evaluate | ( | const std::string & | s, |
| size_t | pos = 0, |
||
| size_t | len = std::string::npos |
||
| ) |
A simple string evaluation that handles various basic expressions. For trivial input, use readScalar instead (faster).
The evaluation supports the following:
InfoErr<< "Evaluate " << str.substr(pos, len) << nl;
InfoErr<< "Evaluate " << str.substr(pos, len) << nl;
Definition at line 37 of file stringOpsEvaluate.C.
References findTrim(), exprResult::hasValue(), Foam::InfoErr, Foam::nl, parseDriver::parse(), Foam::pos(), exprDriver::result(), exprResult::size(), StringStreamAllocator< StreamType >::str(), and exprResult::writeValue().
Referenced by alphaContactAngleFvPatchScalarField::alphaContactAngleFvPatchScalarField(), alphaContactAngleTwoPhaseFvPatchScalarField::alphaContactAngleTwoPhaseFvPatchScalarField(), uniformFixedValuePointPatchField< Type >::autoMap(), uniformFixedValueFvPatchField< Type >::autoMap(), uniformNormalFixedValueFvPatchVectorField::autoMap(), scaledFixedValueFvPatchField< Type >::autoMap(), basicSymmetryFaPatchField< Type >::basicSymmetryFaPatchField(), basicSymmetryFvPatchField< Type >::basicSymmetryFvPatchField(), constantAlphaContactAngleFvPatchScalarField::constantAlphaContactAngleFvPatchScalarField(), cyclicACMIFvPatchField< Type >::cyclicACMIFvPatchField(), cyclicAMIFvPatchField< scalar >::cyclicAMIFvPatchField(), cyclicFaPatchField< Type >::cyclicFaPatchField(), cyclicFvPatchField< vector >::cyclicFvPatchField(), BlendedInterfacialModel< wallLubricationModel >::D(), directionMixedFvPatchField< Type >::directionMixedFvPatchField(), BlendedInterfacialModel< wallLubricationModel >::dmdt(), dynamicAlphaContactAngleFvPatchScalarField::dynamicAlphaContactAngleFvPatchScalarField(), energyJumpAMIFvPatchScalarField::energyJumpAMIFvPatchScalarField(), energyJumpFvPatchScalarField::energyJumpFvPatchScalarField(), basicSymmetryFvPatchField< Type >::evaluate(), basicSymmetryFaPatchField< Type >::evaluate(), extrapolatedCalculatedFvPatchField< Type >::evaluate(), alphaContactAngleTwoPhaseFvPatchScalarField::evaluate(), symmetryPlaneFvPatchField< Type >::evaluate(), coupledFvPatchField< vector >::evaluate(), valuePointPatchField< vector >::evaluate(), kqRWallFunctionFvPatchField< Type >::evaluate(), fixedGradientFaPatchField< Type >::evaluate(), mixedFaPatchField< Type >::evaluate(), directionMixedFvPatchField< Type >::evaluate(), fixedNormalSlipFvPatchField< Type >::evaluate(), fluxCorrectedVelocityFvPatchVectorField::evaluate(), fixedGradientFvPatchField< Type >::evaluate(), partialSlipFvPatchField< Type >::evaluate(), codedFixedValueFvPatchField< Type >::evaluate(), codedFixedValuePointPatchField< Type >::evaluate(), codedMixedFvPatchField< Type >::evaluate(), mixedFvPatchField< scalar >::evaluate(), calcEntry::execute(), evalEntry::execute(), ifeqEntry::execute(), codeStream::execute(), exprFixedValueFvPatchField< Type >::exprFixedValueFvPatchField(), exprMixedFvPatchField< Type >::exprMixedFvPatchField(), exprValuePointPatchField< Type >::exprValuePointPatchField(), externalCoupledTemperatureMixedFvPatchScalarField::externalCoupledTemperatureMixedFvPatchScalarField(), extrapolatedCalculatedFvPatchField< Type >::extrapolatedCalculatedFvPatchField(), BlendedInterfacialModel< wallLubricationModel >::F(), fanFvPatchField< Type >::fanFvPatchField(), BlendedInterfacialModel< wallLubricationModel >::Ff(), fixedGradientFaPatchField< Type >::fixedGradientFaPatchField(), fixedGradientFvPatchField< Type >::fixedGradientFvPatchField(), fixedJumpAMIFvPatchField< scalar >::fixedJumpAMIFvPatchField(), fixedJumpFvPatchField< vector >::fixedJumpFvPatchField(), fixedNormalSlipFvPatchField< Type >::fixedNormalSlipFvPatchField(), fixedProfileFvPatchField< Type >::fixedProfileFvPatchField(), flowRateInletVelocityFvPatchVectorField::flowRateInletVelocityFvPatchVectorField(), flowRateOutletVelocityFvPatchVectorField::flowRateOutletVelocityFvPatchVectorField(), CrankNicolsonDdtScheme< Type >::fvcDdt(), CrankNicolsonDdtScheme< Type >::fvcDdtPhiCorr(), CrankNicolsonDdtScheme< Type >::fvcDdtUfCorr(), CrankNicolsonDdtScheme< Type >::fvmDdt(), interfaceCompressionFvPatchScalarField::interfaceCompressionFvPatchScalarField(), BlendedInterfacialModel< wallLubricationModel >::K(), BlendedInterfacialModel< wallLubricationModel >::Kf(), matchedFlowRateOutletVelocityFvPatchVectorField::matchedFlowRateOutletVelocityFvPatchVectorField(), CrankNicolsonDdtScheme< Type >::meshPhi(), mixedFaPatchField< Type >::mixedFaPatchField(), mixedFvPatchField< scalar >::mixedFvPatchField(), transformFaPatchField< Type >::operator=(), transformFvPatchField< Type >::operator=(), partialSlipFvPatchField< Type >::partialSlipFvPatchField(), Foam::recursiveExpand(), temperatureDependentAlphaContactAngleFvPatchScalarField::temperatureDependentAlphaContactAngleFvPatchScalarField(), timeVaryingAlphaContactAngleFvPatchScalarField::timeVaryingAlphaContactAngleFvPatchScalarField(), timeVaryingMappedFixedValueFvPatchField< Type >::timeVaryingMappedFixedValueFvPatchField(), timeVaryingMappedFixedValuePointPatchField< Type >::timeVaryingMappedFixedValuePointPatchField(), uniformDensityHydrostaticPressureFvPatchScalarField::uniformDensityHydrostaticPressureFvPatchScalarField(), uniformFixedGradientFvPatchField< Type >::uniformFixedGradientFvPatchField(), uniformFixedValueFvPatchField< Type >::uniformFixedValueFvPatchField(), uniformFixedValuePointPatchField< Type >::uniformFixedValuePointPatchField(), uniformJumpAMIFvPatchField< Type >::uniformJumpAMIFvPatchField(), uniformJumpFvPatchField< Type >::uniformJumpFvPatchField(), uniformNormalFixedValueFvPatchVectorField::uniformNormalFixedValueFvPatchVectorField(), pressureInletOutletVelocityFvPatchVectorField::updateCoeffs(), fixedNormalInletOutletVelocityFvPatchVectorField::updateCoeffs(), wallHeatTransferFvPatchScalarField::wallHeatTransferFvPatchScalarField(), wedgeFaPatchField< Type >::wedgeFaPatchField(), and wedgeFvPatchField< Type >::wedgeFvPatchField().
| int natstrcmp | ( | const char * | s1, |
| const char * | s2 | ||
| ) |
'Natural' compare for C-strings
Uses algorithm and code from Jan-Marten Spit jmspit@euronet.nl
In the 'natural' comparison, strings are compared alphabetically and numerically. Thus 'file010.txt' sorts after 'file2.txt'
| s1 | left string |
| s2 | right string |
Definition at line 118 of file stringOpsSort.C.
Referenced by natural_sort::compare().