Commit 283f4fab authored by mattijs's avatar mattijs
Browse files

ENH: string : recursive variable substitution

parent fb92bdb5
......@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment