Go to the documentation of this file.
44 #ifndef stringListOps_H
45 #define stringListOps_H
62 template<
class UnaryMatchPredicate,
class StringType>
65 const UnaryMatchPredicate& matcher,
66 const UList<StringType>& input,
73 template<
class StringType>
87 template<
class StringType>
106 template<
class StringType>
120 template<
class StringType>
133 template<
class StringType>
153 template<
class UnaryMatchPredicate,
class StringListType>
156 const UnaryMatchPredicate& matcher,
157 const StringListType& input,
164 template<
class StringListType>
168 const StringListType& input,
178 template<
class StringListType>
182 const StringListType& input,
196 template<
class StringListType>
200 const StringListType& input,
209 template<
class StringListType>
213 const StringListType& input,
223 template<
class StringListType>
227 const StringListType& input,
239 template<
class UnaryMatchPredicate,
class StringListType>
242 const UnaryMatchPredicate& matcher,
243 StringListType& input,
249 template<
class StringListType>
253 StringListType& input,
262 template<
class StringListType>
266 StringListType& input,
280 template<
class StringListType>
284 StringListType& input,
293 template<
class StringListType>
297 StringListType& input,
306 template<
class StringListType>
310 StringListType& input,
324 namespace stringListOps
333 template<
class StringType>
366 template<
class StringType>
369 const char* disallowed,
370 const UList<StringType>& input,
378 template<
class StringType>
381 const std::string& disallowed,
382 const UList<StringType>& input,
390 template<
class StringListType>
393 const char* disallowed,
394 const StringListType& input,
402 template<
class StringListType>
405 const std::string& disallowed,
406 const StringListType& input,
414 template<
class StringListType>
417 const char* disallowed,
418 StringListType& input,
426 template<
class StringListType>
429 const std::string& disallowed,
430 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.
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.
bool found(const T &val, const label start=0) const
True if the value if found in the list.
A List of wordRe with additional matching capabilities.
const UList< StringType > & values
bool operator()(const std::string &text) const
labelList findMatchingStrings(const UnaryMatchPredicate &matcher, const UList< StringType > &input, const bool invert=false)
Extract list indices for all matches.