31 template<
class UnaryMatchPredicate,
class StringType>
34 const UnaryMatchPredicate& matcher,
35 const UList<StringType>& input,
39 const label len = input.size();
44 for (label i=0; i < len; ++i)
52 indices.resize(
count);
58 template<
class UnaryMatchPredicate,
class StringListType>
61 const UnaryMatchPredicate& matcher,
62 const StringListType& input,
66 const label len = input.size();
68 StringListType output(len);
72 for (label i=0; i < len; ++i)
76 output[
count] = input[i];
86 template<
class UnaryMatchPredicate,
class StringListType>
89 const UnaryMatchPredicate& matcher,
90 StringListType& input,
94 const label len = input.size();
97 for (label i=0; i < len; ++i)
103 input[
count] = std::move(input[i]);
112 template<
class StringListType,
class AccessOp>
115 const StringListType& input,
116 const wordRes& whitelist,
117 const wordRes& blacklist,
121 const label len = input.size();
123 if (whitelist.empty() && blacklist.empty())
131 for (label i=0; i < len; ++i)
133 const std::string& text = aop(input[i]);
137 if (whitelist.size())
139 const auto result = whitelist.matched(text);
143 result == wordRe::LITERAL
145 : (result == wordRe::REGEX && !blacklist.match(text))
150 accept = !blacklist.match(text);
159 indices.resize(
count);