35 #ifndef stringListOps_H 36 #define stringListOps_H 54 const std::string& str
57 return matcher.
match(str);
63 template<
class Matcher,
class StringType>
73 template<
class StringType>
86 template<
class StringType>
89 const char* rePattern,
100 template<
class StringType>
103 const std::string& rePattern,
114 template<
class StringType>
128 template<
class StringType>
145 template<
class Matcher,
class StringListType>
149 const StringListType&,
155 template<
class StringListType>
159 const StringListType& lst,
168 template<
class StringListType>
171 const char* rePattern,
172 const StringListType& lst,
182 template<
class StringListType>
185 const std::string& rePattern,
186 const StringListType& lst,
196 template<
class StringListType>
200 const StringListType& lst,
209 template<
class StringListType>
213 const StringListType& lst,
225 template<
class Matcher,
class StringListType>
235 template<
class StringListType>
248 template<
class StringListType>
251 const char* rePattern,
262 template<
class StringListType>
265 const std::string& rePattern,
276 template<
class StringListType>
289 template<
class StringListType>
StringListType subsetMatchingStrings(const Matcher &, const StringListType &, const bool invert=false)
Extract elements of StringList when regular expression matches.
Wrapper around POSIX extended regular expressions.
void inplaceSubsetStrings(const regExp &re, StringListType &lst, const bool invert=false)
Inplace extract elements of StringList when regular expression matches.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
bool findStrings(const wordReListMatcher &matcher, const std::string &str)
Return true if string matches one of the regular expressions.
labelList findMatchingStrings(const Matcher &, const UList< StringType > &, const bool invert=false)
Return list indices for matching strings.
labelList invert(const label len, const labelUList &)
Invert one-to-one map. Unmapped elements will be -1.
A wordRe is a word, but can also have a regular expression for matching words.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
A wrapper for matching a List of wordRe.
StringListType subsetStrings(const regExp &re, const StringListType &lst, const bool invert=false)
Extract elements of StringList when regular expression matches.
const dimensionedScalar re
Classical electron radius: default SI units: [m].
bool match(const string &, bool literalMatch=false) const
Return true if string matches any of the regular expressions.
void inplaceSubsetMatchingStrings(const Matcher &, StringListType &, const bool invert=false)
Inplace extract elements of StringList when regular expression matches.