MCPcopy Create free account
hub / github.com/Achain-Dev/Achain / contains

Function contains

include/win/boost/algorithm/string/predicate.hpp:213–230  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 6

icontainsFunction · 0.70
can_dispatchMethod · 0.50
can_dispatchMethod · 0.50
dispatchMethod · 0.50
dispatchMethod · 0.50
dispatchMethod · 0.50

Calls 6

first_finderFunction · 0.85
is_equalClass · 0.85
as_literalFunction · 0.50
emptyFunction · 0.50
beginFunction · 0.50
endFunction · 0.50

Tested by

no test coverage detected