Various utility functions to work on lists of strings. More...
Classes | |
struct | foundOp |
Functor to determine if a string is exists in a list of strings. More... | |
Functions | |
template<class StringListType , class AccessOp = noOp> | |
labelList | findMatching (const StringListType &input, const wordRes &allow, const wordRes &deny=wordRes(), AccessOp aop=noOp()) |
Return ids for items with matching names. More... | |
Various utility functions to work on lists of strings.
labelList Foam::stringListOps::findMatching | ( | const StringListType & | input, |
const wordRes & | allow, | ||
const wordRes & | deny = wordRes() , |
||
AccessOp | aop = noOp() |
||
) |
Return ids for items with matching names.
Uses a combination of allow and deny lists
An empty 'allow' list accepts everything not in the 'deny' list. A literal match has higher priority over a regex match.
Eg,
input: ( abc apple wall wall1 wall2 ) allow: ( abc def "wall.*" ) deny: ( "[ab].*" wall ) result: (abc wall1 wall2)
Referenced by ensightMesh::correct(), sampledMeshedSurface::sampledMeshedSurface(), and triSurface::subsetMesh().