mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: provide string removeStart, removeEnd convenience methods
This commit is contained in:
@ -69,6 +69,16 @@ int main(int argc, char *argv[])
|
||||
Info<<"trimRight: " << stringOps::trimRight(test) << endl;
|
||||
Info<<"trim: " << stringOps::trim(test) << endl;
|
||||
|
||||
{
|
||||
fileName test1("libFooBar.so");
|
||||
|
||||
Info<< nl;
|
||||
Info<< "trim filename: " << test1 << nl;
|
||||
|
||||
test1.removeStart("lib");
|
||||
Info<<"without leading 'lib': " << test1 << nl;
|
||||
}
|
||||
|
||||
Info<< nl;
|
||||
Info<<"camel-case => " << (word("camel") & "case") << nl;
|
||||
for (const auto& s : { " text with \"spaces'", "08/15 value" })
|
||||
|
||||
Reference in New Issue
Block a user