stringListOps.H File Reference

Operations on lists of strings. More...

Include dependency graph for stringListOps.H:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  foundOp< StringType >
 Functor to determine if a string is exists in a list of strings. More...
 

Namespaces

namespace  Foam::stringListOps
 Various utility functions to work on lists of strings.
 
namespace  Foam
 Namespace for OpenFOAM.
 

Functions

template<class UnaryMatchPredicate , class StringType >
label firstMatchingString (const UnaryMatchPredicate &matcher, const UList< StringType > &input, const bool invert=false)
 Find first list item that matches, -1 on failure. More...
 
template<class UnaryMatchPredicate , class StringType >
labelList findMatchingStrings (const UnaryMatchPredicate &matcher, const UList< StringType > &input, const bool invert=false)
 Extract list indices for all matches. More...
 
template<class StringType >
labelList findStrings (const regExp &matcher, const UList< StringType > &input, const bool invert=false)
 Return list indices for strings matching the regular expression. More...
 
template<class StringType >
labelList findStrings (const keyType &matcher, const UList< StringType > &input, const bool invert=false)
 Return list indices for strings matching the regular expression. More...
 
template<class StringType >
labelList findStrings (const wordRe &matcher, const UList< StringType > &input, const bool invert=false)
 Return list indices for strings matching the regular expression. More...
 
template<class StringType >
labelList findStrings (const wordRes &matcher, const UList< StringType > &input, const bool invert=false)
 Return list indices for strings matching one of the regular expression. More...
 
template<class StringType >
labelList findStrings (const UList< wordRe > &patterns, const UList< StringType > &input, const bool invert=false)
 Return list indices for strings matching one of the regular expression. More...
 
template<class UnaryMatchPredicate , class StringListType >
StringListType subsetMatchingStrings (const UnaryMatchPredicate &matcher, const StringListType &input, const bool invert=false)
 Extract elements of StringList when regular expression matches. More...
 
template<class StringListType >
StringListType subsetStrings (const regExp &matcher, const StringListType &input, const bool invert=false)
 Extract elements of StringList when regular expression matches. More...
 
template<class StringListType >
StringListType subsetStrings (const keyType &matcher, const StringListType &input, const bool invert=false)
 Extract elements of StringList when regular expression matches. More...
 
template<class StringListType >
StringListType subsetStrings (const wordRe &matcher, const StringListType &input, const bool invert=false)
 Extract elements of StringList when regular expression matches. More...
 
template<class StringListType >
StringListType subsetStrings (const wordRes &matcher, const StringListType &input, const bool invert=false)
 Extract elements of StringList when regular expression matches. More...
 
template<class StringListType >
StringListType subsetStrings (const UList< wordRe > &patterns, const StringListType &input, const bool invert=false)
 Extract elements of StringList when regular expression matches. More...
 
template<class UnaryMatchPredicate , class StringListType >
void inplaceSubsetMatchingStrings (const UnaryMatchPredicate &matcher, StringListType &input, const bool invert=false)
 Inplace extract elements of StringList when regular expression matches. More...
 
template<class StringListType >
void inplaceSubsetStrings (const regExp &matcher, StringListType &input, const bool invert=false)
 Inplace extract elements of StringList when regular expression matches. More...
 
template<class StringListType >
void inplaceSubsetStrings (const keyType &matcher, StringListType &input, const bool invert=false)
 Extract elements of StringList when regular expression matches. More...
 
template<class StringListType >
void inplaceSubsetStrings (const wordRe &matcher, StringListType &input, const bool invert=false)
 Inplace extract elements of StringList when regular expression matches. More...
 
template<class StringListType >
void inplaceSubsetStrings (const wordRes &matcher, StringListType &input, const bool invert=false)
 Inplace extract elements of StringList when regular expression matches. More...
 
template<class StringListType >
void inplaceSubsetStrings (const UList< wordRe > &regexs, StringListType &input, const bool invert=false)
 Inplace extract elements of StringList when regular expression matches. More...
 
template<class StringListType , class AccessOp = identityOp>
labelList findMatching (const StringListType &input, const wordRes::filter &pred, AccessOp aop=identityOp())
 Return ids for items with matching names. More...
 
template<class StringListType , class AccessOp = identityOp>
labelList findMatching (const StringListType &input, const wordRes &allow, const wordRes &deny=wordRes::null(), AccessOp aop=identityOp())
 Return ids for items with matching names. More...
 
template<class StringType >
labelList findStrings (const char *disallowed, const UList< StringType > &input, const bool invert=false)=delete
 Deprecated(2018-02) find using C-string as a regex. More...
 
template<class StringType >
labelList findStrings (const std::string &disallowed, const UList< StringType > &input, const bool invert=false)=delete
 Deprecated(2018-02) find using string as a regex. More...
 
template<class StringListType >
StringListType subsetStrings (const char *disallowed, const StringListType &input, const bool invert=false)=delete
 Deprecated(2018-02) subset using C-string as a regex. More...
 
template<class StringListType >
StringListType subsetStrings (const std::string &disallowed, const StringListType &input, const bool invert=false)=delete
 Deprecated(2018-02) subset using string as a regex. More...
 
template<class StringListType >
void inplaceSubsetStrings (const char *disallowed, StringListType &input, const bool invert=false)=delete
 Deprecated(2018-02) subset using C-string as a regex. More...
 
template<class StringListType >
void inplaceSubsetStrings (const std::string &disallowed, StringListType &input, const bool invert=false)=delete
 Deprecated(2018-02) subset using string as a regex. More...
 

Detailed Description

Operations on lists of strings.

Original source file stringListOps.H

InNamespace Foam

Definition in file stringListOps.H.