MemoryExtensions.LastIndexOfAnyExceptInRange 方法

定义

重载

LastIndexOfAnyExceptInRange<T>(Span<T>, T, T)

搜索 和 highInclusive之间的lowInclusive范围之外的任何值的最后一个索引,包括 。

LastIndexOfAnyExceptInRange<T>(ReadOnlySpan<T>, T, T)

搜索 和 highInclusive之间的lowInclusive范围之外的任何值的最后一个索引,包括 。

LastIndexOfAnyExceptInRange<T>(Span<T>, T, T)

Source:
MemoryExtensions.cs
Source:
MemoryExtensions.cs

搜索 和 highInclusive之间的lowInclusive范围之外的任何值的最后一个索引,包括 。

public:
generic <typename T>
 where T : IComparable<T>[System::Runtime::CompilerServices::Extension]
 static int LastIndexOfAnyExceptInRange(Span<T> span, T lowInclusive, T highInclusive);
public static int LastIndexOfAnyExceptInRange<T> (this Span<T> span, T lowInclusive, T highInclusive) where 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

类型参数

T

范围和值的类型。

参数

span
Span<T>

要搜索的跨度。

lowInclusive
T

排除范围的下限(含)。

highInclusive
T

排除范围的上限(含)。

返回

指定范围之外的任何值最后一次出现的索引。 如果所有值都在指定范围内,则 返回 -1。

适用于

LastIndexOfAnyExceptInRange<T>(ReadOnlySpan<T>, T, T)

Source:
MemoryExtensions.cs
Source:
MemoryExtensions.cs

搜索 和 highInclusive之间的lowInclusive范围之外的任何值的最后一个索引,包括 。

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

类型参数

T

范围和值的类型。

参数

span
ReadOnlySpan<T>

要搜索的跨度。

lowInclusive
T

排除范围的下限(含)。

highInclusive
T

排除范围的上限(含)。

返回

指定范围之外的任何值最后一次出现的索引。 如果所有值都在指定范围内,则 返回 -1。

适用于