Commit 06f08f74 authored by Mark Olesen's avatar Mark Olesen
Browse files

ENH: rationalize some string methods.

- silently deprecate 'startsWith', 'endsWith' methods
  (added in 2016: 2b1436066221), in favour of
  'starts_with', 'ends_with' methods, corresponding to C++20 and
  allowing us to cull then in a few years.

- handle single character versions of starts_with, ends_with.

- add single character version of removeEnd and silently deprecate
  removeTrailing which did the same thing.

- drop the const versions of removeRepeated, removeTrailing.
  Unused and with potential confusion.

STYLE: use shrink_to_fit(), erase()
parent d1591319
......@@ -678,7 +678,7 @@ void Foam::vtkPVFoam::Update
// Suppress caching of Lagrangian since it normally always changes.
[](const word& k){ return k.startsWith("lagrangian/"); },
[](const word& k){ return k.starts_with("lagrangian/"); },
true // prune
......@@ -179,7 +179,7 @@ void Foam::vtkPVFoam::convertMeshPatches()
if (longName.startsWith("group/"))
if (longName.starts_with("group/"))
// Patch group. Collect patch faces.
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