Splits this sequence into a prefix/suffix pair according to a predicate.
The first sequence will contain the longest prefix of this sequence whose elements all satisfy predicate.
Namespace: SequencesAssembly: Sequences (in Sequences.dll) Version: 1.0.1.0 (1.0.1)
Syntax public Tuple<ISequence<T>, ISequence<T>> Span(
Func<T, bool> predicate
)
public Tuple<ISequence<T>, ISequence<T>> Span(
Func<T, bool> predicate
)
Public Function Span (
predicate As Func(Of T, Boolean)
) As Tuple(Of ISequence(Of T), ISequence(Of T))
Public Function Span (
predicate As Func(Of T, Boolean)
) As Tuple(Of ISequence(Of T), ISequence(Of T))
public:
virtual Tuple<ISequence<T>^, ISequence<T>^>^ Span(
Func<T, bool>^ predicate
) sealed
public:
virtual Tuple<ISequence<T>^, ISequence<T>^>^ Span(
Func<T, bool>^ predicate
) sealed
abstract Span :
predicate : Func<'T, bool> -> Tuple<ISequence<'T>, ISequence<'T>>
override Span :
predicate : Func<'T, bool> -> Tuple<ISequence<'T>, ISequence<'T>>
abstract Span :
predicate : Func<'T, bool> -> Tuple<ISequence<'T>, ISequence<'T>>
override Span :
predicate : Func<'T, bool> -> Tuple<ISequence<'T>, ISequence<'T>>
Parameters
- predicate
- Type: System Func T, Boolean
The predicate used to split this sequence.
Return Value
Type:
Tuple ISequence T ,
ISequence T A pair consisting of the longest prefix of this sequence whose elements all satisfy
predicate, and the rest of this sequence.
Implements
ISequence T Span(Func T, Boolean )See Also