MemoryExtensions.LastIndexOfAnyInRange 方法

定义

重载

LastIndexOfAnyInRange<T>(ReadOnlySpan<T>, T, T)

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

LastIndexOfAnyInRange<T>(Span<T>, T, T)

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

LastIndexOfAnyInRange<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 LastIndexOfAnyInRange(ReadOnlySpan<T> span, T lowInclusive, T highInclusive);
public static int LastIndexOfAnyInRange<T> (this ReadOnlySpan<T> span, T lowInclusive, T highInclusive) where T : IComparable<T>;
static member LastIndexOfAnyInRange : ReadOnlySpan<'T (requires 'T :> IComparable<'T>)> * 'T * 'T -> int (requires 'T :> IComparable<'T>)
<Extension()>
Public Function LastIndexOfAnyInRange(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。

适用于

LastIndexOfAnyInRange<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 LastIndexOfAnyInRange(Span<T> span, T lowInclusive, T highInclusive);
public static int LastIndexOfAnyInRange<T> (this Span<T> span, T lowInclusive, T highInclusive) where T : IComparable<T>;
static member LastIndexOfAnyInRange : Span<'T (requires 'T :> IComparable<'T>)> * 'T * 'T -> int (requires 'T :> IComparable<'T>)
<Extension()>
Public Function LastIndexOfAnyInRange(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。

适用于