MCPcopy Create free account
hub / github.com/ablab/spades / contains

Function contains

ext/include/boost/algorithm/string/predicate.hpp:214–231  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

212 */
213 template<typename Range1T, typename Range2T, typename PredicateT>
214 inline bool contains(
215 const Range1T& Input,
216 const Range2T& Test,
217 PredicateT Comp)
218 {
219 iterator_range<BOOST_STRING_TYPENAME range_const_iterator<Range1T>::type> lit_input(::boost::as_literal(Input));
220 iterator_range<BOOST_STRING_TYPENAME range_const_iterator<Range2T>::type> lit_test(::boost::as_literal(Test));
221
222 if (::boost::empty(lit_test))
223 {
224 // Empty range is contained always
225 return true;
226 }
227
228 // Use the temporary variable to make VACPP happy
229 bool bResult=(::boost::algorithm::first_finder(lit_test,Comp)(::boost::begin(lit_input), ::boost::end(lit_input)));
230 return bResult;
231 }
232
233 //! 'Contains' predicate
234 /*!

Callers 1

icontainsFunction · 0.70

Calls 6

as_literalFunction · 0.85
first_finderFunction · 0.85
is_equalClass · 0.85
emptyFunction · 0.50
beginClass · 0.50
endClass · 0.50

Tested by

no test coverage detected