Go to the documentation of this file.
44 #ifndef stringListOps_H
45 #define stringListOps_H
63 template<
class UnaryMatchPredicate,
class StringType>
66 const UnaryMatchPredicate& matcher,
67 const UList<StringType>&
input,
74 template<
class StringType>
88 template<
class StringType>
107 template<
class StringType>
121 template<
class StringType>
134 template<
class StringType>
154 template<
class UnaryMatchPredicate,
class StringListType>
157 const UnaryMatchPredicate& matcher,
158 const StringListType&
input,
165 template<
class StringListType>
169 const StringListType&
input,
179 template<
class StringListType>
183 const StringListType&
input,
197 template<
class StringListType>
201 const StringListType&
input,
210 template<
class StringListType>
214 const StringListType&
input,
224 template<
class StringListType>
228 const StringListType&
input,
240 template<
class UnaryMatchPredicate,
class StringListType>
243 const UnaryMatchPredicate& matcher,
244 StringListType&
input,
250 template<
class StringListType>
254 StringListType&
input,
263 template<
class StringListType>
267 StringListType&
input,
281 template<
class StringListType>
285 StringListType&
input,
294 template<
class StringListType>
298 StringListType&
input,
307 template<
class StringListType>
311 StringListType&
input,
325 namespace stringListOps
334 template<
class StringType>
367 template<
class StringListType,
class AccessOp = noOp>
370 const StringListType&
input,
373 AccessOp aop =
noOp()
393 template<
class StringType>
396 const char* disallowed,
397 const UList<StringType>&
input,
405 template<
class StringType>
408 const std::string& disallowed,
409 const UList<StringType>&
input,
417 template<
class StringListType>
420 const char* disallowed,
421 const StringListType&
input,
429 template<
class StringListType>
432 const std::string& disallowed,
433 const StringListType&
input,
441 template<
class StringListType>
444 const char* disallowed,
445 StringListType&
input,
453 template<
class StringListType>
456 const std::string& disallowed,
457 StringListType&
input,
List< label > labelList
A List of labels.
bool isPattern() const
The keyType is treated as a pattern, not as literal string.
Functor to determine if a string is exists in a list of strings.
void inplaceSubsetStrings(const regExp &matcher, StringListType &input, const bool invert=false)
Inplace extract elements of StringList when regular expression matches.
StringListType subsetMatchingStrings(const UnaryMatchPredicate &matcher, const StringListType &input, const bool invert=false)
Extract elements of StringList when regular expression matches.
A wordRe is a Foam::word, but can contain a regular expression for matching words or strings.
labelList invert(const label len, const labelUList &map)
Create an inverse one-to-one mapping.
regExpCxx regExp
Selection of preferred regular expression implementation.
A class for handling keywords in dictionaries.
labelList findMatching(const StringListType &input, const wordRes &allow, const wordRes &deny=wordRes(), AccessOp aop=noOp())
Return ids for items with matching names.
Wrapper around C++11 regular expressions.
StringListType subsetStrings(const regExp &matcher, const StringListType &input, const bool invert=false)
Extract elements of StringList when regular expression matches.
labelList findStrings(const regExp &matcher, const UList< StringType > &input, const bool invert=false)
Return list indices for strings matching the regular expression.
foundOp(const UList< StringType > &list)
Functor wrapper for matching against a List of wordRe.
void inplaceSubsetMatchingStrings(const UnaryMatchPredicate &matcher, StringListType &input, const bool invert=false)
Inplace extract elements of StringList when regular expression matches.
A List of wordRe with additional matching capabilities.
const UList< StringType > & values
static Istream & input(Istream &is, IntRange< T > &range)
bool operator()(const std::string &text) const
bool found(const T &val, label pos=0) const
True if the value if found in the list.
labelList findMatchingStrings(const UnaryMatchPredicate &matcher, const UList< StringType > &input, const bool invert=false)
Extract list indices for all matches.
Pass through value. Should never be specialized.