coveo::linq
Implementation of .NET-like LINQ operators in C++
|
Skips the first elements in a sequence. More...
Functions | |
template<typename = void> | |
auto | coveo::linq::skip (std::size_t n) -> detail::skip_impl< detail::skip_n_pred<>> |
Skips the first N elements in sequence. More... | |
template<typename Pred > | |
auto | coveo::linq::skip_while (Pred &&pred) -> detail::skip_impl< detail::indexless_selector_proxy< Pred >> |
Skips the first elements in sequence satisfying predicate. More... | |
template<typename Pred > | |
auto | coveo::linq::skip_while_with_index (Pred &&pred) -> detail::skip_impl< Pred > |
Skips the first elements in sequence satisfying predicate using element index. More... | |
The skip
operator (and its siblings) skip the first elements in a sequence, either by skipping a certain number or using a predicate.
.NET equivalent: Skip / SkipWhile
auto coveo::linq::skip | ( | std::size_t | n | ) | -> detail::skip_impl<detail::skip_n_pred<>> |
Given a source sequence, returns a new sequence that skips the first n
elements of the source sequence. If the source sequence contains less than n
elements, returns an empty sequence.
Use like this:
n | Number of elements to skip. |
n
elements of source sequence. auto coveo::linq::skip_while | ( | Pred && | pred | ) | -> detail::skip_impl<detail::indexless_selector_proxy<Pred>> |
Given a source sequence, returns a new sequence that skips the first elements of the source sequence that satisfy the provided predicate. If the source sequence contains only elements that satisfy the predicate, returns an empty sequence.
Use like this:
pred | Predicate used to skip elements. |
pred
. auto coveo::linq::skip_while_with_index | ( | Pred && | pred | ) | -> detail::skip_impl<Pred> |
Given a source sequence, returns a new sequence that skips the first elements of the source sequence that satisfy the provided predicate. If the source sequence contains only elements that satisfy the predicate, returns an empty sequence.
The predicate is called with two parameters every time: an element from the source sequence, and its position in the sequence.
Use like this:
pred | Predicate used to skip elements. |
pred
.