Finds first index where this list contains a given sequence as a slice.
Namespace: FlinqAssembly: Flinq (in Flinq.dll) Version: 1.0.2.0 (1.0.2.0)
Syntax
C# |
---|
public static int IndexOfSlice<A>( this IEnumerable<A> source, IEnumerable<A> that, IEqualityComparer<A> comparer ) |
Parameters
- source
- Type: System.Collections.Generic..::..IEnumerable<(Of <(<'A>)>)>
The input sequence.
- that
- Type: System.Collections.Generic..::..IEnumerable<(Of <(<'A>)>)>
The sequence to test.
- comparer
- Type: System.Collections.Generic..::..IEqualityComparer<(Of <(<'A>)>)>
An IEqualityComparer<A> to use to compare elements. If comparer is null, the default equality comparer, EqualityComparer<A>.Default, is used to compare elements.
Type Parameters
- A
- The type of the elements in the input sequence.
Return Value
Type: Int32The first index such that the elements of this list starting at this index match the elements of sequence that, or -1 of no such subsequence exists.