mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: string : recursive variable substitution
This commit is contained in:
@ -94,7 +94,7 @@ Foam::string& Foam::string::replaceAll
|
||||
|
||||
|
||||
// Expand all occurences of environment variables and initial tilde sequences
|
||||
Foam::string& Foam::string::expand()
|
||||
Foam::string& Foam::string::expand(const bool recurse)
|
||||
{
|
||||
size_type startEnvar = 0;
|
||||
|
||||
@ -140,6 +140,10 @@ Foam::string& Foam::string::expand()
|
||||
|
||||
if (enVarString.size())
|
||||
{
|
||||
if (recurse)
|
||||
{
|
||||
enVarString.expand();
|
||||
}
|
||||
std::string::replace
|
||||
(
|
||||
startEnvar,
|
||||
|
||||
@ -182,7 +182,7 @@ public:
|
||||
//
|
||||
// @sa
|
||||
// Foam::findEtcFile
|
||||
string& expand();
|
||||
string& expand(const bool recurse=false);
|
||||
|
||||
//- Remove repeated characters returning true if string changed
|
||||
bool removeRepeated(const char);
|
||||
|
||||
Reference in New Issue
Block a user