MemoryExtensions.LastIndexOfAnyExceptInRange Method (System) (original) (raw)

Source:

MemoryExtensions.cs

Source:

MemoryExtensions.cs

Source:

MemoryExtensions.cs

Searches for the last index of any value outside of the range between lowInclusive and highInclusive, inclusive.

public:
generic <typename T>
 where T : IComparable<T>[System::Runtime::CompilerServices::Extension]
 static int LastIndexOfAnyExceptInRange(Span<T> span, T lowInclusive, T highInclusive);
[System.Runtime.CompilerServices.OverloadResolutionPriority(-1)]
public static int LastIndexOfAnyExceptInRange<T>(this Span<T> span, T lowInclusive, T highInclusive) where T : IComparable<T>;
public static int LastIndexOfAnyExceptInRange<T>(this Span<T> span, T lowInclusive, T highInclusive) where T : IComparable<T>;
[<System.Runtime.CompilerServices.OverloadResolutionPriority(-1)>]
static member LastIndexOfAnyExceptInRange : Span<'T (requires 'T :> IComparable<'T>)> * 'T * 'T -> int (requires 'T :> IComparable<'T>)
static member LastIndexOfAnyExceptInRange : Span<'T (requires 'T :> IComparable<'T>)> * 'T * 'T -> int (requires 'T :> IComparable<'T>)
<Extension()>
Public Function LastIndexOfAnyExceptInRange(Of T As IComparable(Of T)) (span As Span(Of T), lowInclusive As T, highInclusive As T) As Integer

Type Parameters

T

The type of the span and values.

Parameters

lowInclusive

T

The lower bound, inclusive, of the excluded range.

highInclusive

T

The upper bound, inclusive, of the excluded range.

Returns

The index in the span of the last occurrence of any value outside of the specified range. If all of the values are inside of the specified range, returns -1.

Attributes

Applies to