ENH: provide string removeStart, removeEnd convenience methods

This commit is contained in:
Mark Olesen
2017-03-10 11:39:40 +01:00
parent 9810c68e76
commit 9077098935
4 changed files with 63 additions and 4 deletions

View File

@ -93,12 +93,11 @@ 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
libName.removeStart("lib"); // Remove leading 'lib' from name
return libName;
}
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
void Foam::dynamicCode::copyAndFilter