44#ifndef Foam_stringListOps_H
45#define Foam_stringListOps_H
57 template<
class UnaryMatchPredicate,
class StringType>
60 const UnaryMatchPredicate& matcher,
74 template<
class UnaryMatchPredicate,
class StringType>
77 const UnaryMatchPredicate& matcher,
85 template<
class StringType>
99 template<
class StringType>
118 template<
class StringType>
132 template<
class StringType>
145 template<
class StringType>
166 template<
class UnaryMatchPredicate,
class StringListType>
169 const UnaryMatchPredicate& matcher,
170 const StringListType&
input,
177 template<
class StringListType>
181 const StringListType&
input,
191 template<
class StringListType>
195 const StringListType&
input,
209 template<
class StringListType>
213 const StringListType&
input,
222 template<
class StringListType>
226 const StringListType&
input,
236 template<
class StringListType>
240 const StringListType&
input,
252 template<
class UnaryMatchPredicate,
class StringListType>
255 const UnaryMatchPredicate& matcher,
256 StringListType&
input,
262 template<
class StringListType>
266 StringListType&
input,
275 template<
class StringListType>
279 StringListType&
input,
293 template<
class StringListType>
297 StringListType&
input,
306 template<
class StringListType>
310 StringListType&
input,
319 template<
class StringListType>
323 StringListType&
input,
335namespace stringListOps
344template<
class StringType>
365template<
class StringListType,
class AccessOp =
identityOp>
368 const StringListType&
input,
390template<
class StringListType,
class AccessOp =
identityOp>
393 const StringListType&
input,
416 template<
class StringType>
419 const char* disallowed,
428 template<
class StringType>
431 const std::string& disallowed,
440 template<
class StringListType>
443 const char* disallowed,
444 const StringListType&
input,
452 template<
class StringListType>
455 const std::string& disallowed,
456 const StringListType&
input,
464 template<
class StringListType>
467 const char* disallowed,
468 StringListType&
input,
476 template<
class StringListType>
479 const std::string& disallowed,
480 StringListType&
input,
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
bool found(const T &val, label pos=0) const
True if the value if found in the list.
A class for handling keywords in dictionaries.
bool isPattern() const noexcept
The keyType is treated as a pattern, not as literal string.
Wrapper around C++11 regular expressions with some additional prefix-handling. The prefix-handling is...
A wordRe is a Foam::word, but can contain a regular expression for matching words or strings.
A List of wordRe with additional matching capabilities.
labelList findMatching(const StringListType &input, const wordRes::filter &pred, AccessOp aop=identityOp())
Return ids for items with matching names.
void inplaceSubsetStrings(const regExp &matcher, StringListType &input, const bool invert=false)
Inplace extract elements of StringList when regular expression matches.
label firstMatchingString(const UnaryMatchPredicate &matcher, const UList< StringType > &input, const bool invert=false)
Find first list item that matches, -1 on failure.
static Istream & input(Istream &is, IntRange< T > &range)
StringListType subsetStrings(const regExp &matcher, const StringListType &input, const bool invert=false)
Extract elements of StringList when regular expression matches.
labelList findMatchingStrings(const UnaryMatchPredicate &matcher, const UList< StringType > &input, const bool invert=false)
Extract list indices for all matches.
void inplaceSubsetMatchingStrings(const UnaryMatchPredicate &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.
regExpCxx regExp
Selection of preferred regular expression implementation.
labelList invert(const label len, const labelUList &map)
Create an inverse one-to-one mapping.
labelList findStrings(const regExp &matcher, const UList< StringType > &input, const bool invert=false)
Return list indices for strings matching the regular expression.
Various functors for unary and binary operations. Can be used for parallel combine-reduce operations ...
Functor to determine if a string is exists in a list of strings.
const UList< StringType > & values
bool operator()(const std::string &text) const
foundOp(const UList< StringType > &list)
Functor wrapper of allow/deny lists of wordRe for filtering.
Functor wrapper of a list of wordRe for matching.