mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-12-28 03:37:59 +00:00
ENH: adjust fileName methods for similarity to std::filesystem::path
- stem(), replace_name(), replace_ext(), remove_ext() etc
- string::contains() method - similar to C++23 method
Eg,
if (keyword.contains('/')) ...
vs
if (keyword.find('/') != std::string::npos) ...
This commit is contained in:
@ -5,7 +5,7 @@
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2016-2021 OpenCFD Ltd.
|
||||
Copyright (C) 2016-2022 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -175,7 +175,7 @@ int main(int argc, char *argv[])
|
||||
// strip erroneous extension (.ccm, .ccmg, .ccmp)
|
||||
if (ext == "ccm" || ext == "ccmg" || ext == "ccmp")
|
||||
{
|
||||
exportName = exportName.lessExt();
|
||||
exportName.remove_ext();
|
||||
}
|
||||
}
|
||||
else if (args.found("export"))
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2016 OpenCFD Ltd.
|
||||
Copyright (C) 2016-2022 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -137,7 +137,7 @@ int main(int argc, char *argv[])
|
||||
// strip erroneous extension (.ccm, .ccmg, .ccmp)
|
||||
if (ext == "ccm" || ext == "ccmg" || ext == "ccmp")
|
||||
{
|
||||
exportName = exportName.lessExt();
|
||||
exportName.remove_ext();
|
||||
}
|
||||
}
|
||||
else if (args.found("case"))
|
||||
|
||||
Reference in New Issue
Block a user