语言

MemoryExtensions.LastIndexOfAnyInRange 方法

定义

搜索介于和lowInclusive非独占范围内highInclusive任何值的最后一个索引。

重载

名称 说明
LastIndexOfAnyInRange<T>(ReadOnlySpan<T>, T, T)

搜索介于和lowInclusive非独占范围内highInclusive任何值的最后一个索引。

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

搜索介于和lowInclusive非独占范围内highInclusive任何值的最后一个索引。

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

Source:
MemoryExtensions.cs
Source:
MemoryExtensions.cs
Source:
MemoryExtensions.cs
Source:
MemoryExtensions.cs

搜索介于和lowInclusive非独占范围内highInclusive任何值的最后一个索引。

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
Source:
MemoryExtensions.cs
Source:
MemoryExtensions.cs

搜索介于和lowInclusive非独占范围内highInclusive任何值的最后一个索引。

public:
generic <typename T>
 where T : IComparable<T>[System::Runtime::CompilerServices::Extension]
 static int LastIndexOfAnyInRange(Span<T> span, T lowInclusive, T highInclusive);
[System.Runtime.CompilerServices.OverloadResolutionPriority(-1)]
public static int LastIndexOfAnyInRange<T>(this Span<T> span, T lowInclusive, T highInclusive) where T : IComparable<T>;
public static int LastIndexOfAnyInRange<T>(this Span<T> span, T lowInclusive, T highInclusive) where T : IComparable<T>;
[<System.Runtime.CompilerServices.OverloadResolutionPriority(-1)>]
static member LastIndexOfAnyInRange : Span<'T (requires 'T :> IComparable<'T>)> * 'T * 'T -> int (requires '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。

特性

适用于