mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: add dynamicCode::libraryBaseName() service function
- return the library basename without leading 'lib' or trailing '.so'
This commit is contained in:
@ -77,6 +77,15 @@ void Foam::dynamicCode::checkSecurity
|
||||
}
|
||||
|
||||
|
||||
Foam::word Foam::dynamicCode::libraryBaseName(const fileName& libPath)
|
||||
{
|
||||
word libName(libPath.name(true));
|
||||
libName.erase(0, 3); // remove leading 'lib' from name
|
||||
return libName;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
|
||||
|
||||
void Foam::dynamicCode::copyAndFilter
|
||||
|
||||
Reference in New Issue
Block a user