MemoryExtensions.IndexOfAnyInRange Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
IndexOfAnyInRange<T>(ReadOnlySpan<T>, T, T) |
Searches for the first index of any value in the range between |
IndexOfAnyInRange<T>(Span<T>, T, T) |
Searches for the first index of any value in the range between |
IndexOfAnyInRange<T>(ReadOnlySpan<T>, T, T)
- Source:
- MemoryExtensions.cs
- Source:
- MemoryExtensions.cs
Searches for the first index of any value in the range between lowInclusive
and highInclusive
, inclusive.
public:
generic <typename T>
where T : IComparable<T>[System::Runtime::CompilerServices::Extension]
static int IndexOfAnyInRange(ReadOnlySpan<T> span, T lowInclusive, T highInclusive);
public static int IndexOfAnyInRange<T> (this ReadOnlySpan<T> span, T lowInclusive, T highInclusive) where T : IComparable<T>;
static member IndexOfAnyInRange : ReadOnlySpan<'T (requires 'T :> IComparable<'T>)> * 'T * 'T -> int (requires 'T :> IComparable<'T>)
<Extension()>
Public Function IndexOfAnyInRange(Of T As IComparable(Of T)) (span As ReadOnlySpan(Of T), lowInclusive As T, highInclusive As T) As Integer
Type Parameters
- T
The type of the span and values.
Parameters
- span
- ReadOnlySpan<T>
The span to search.
- lowInclusive
- T
The lower bound, inclusive, of the range for which to search.
- highInclusive
- T
The upper bound, inclusive, of the range for which to search.
Returns
The index in the span of the first occurrence of any value in the specified range. If all of the values are outside of the specified range, returns -1.
Applies to
IndexOfAnyInRange<T>(Span<T>, T, T)
- Source:
- MemoryExtensions.cs
- Source:
- MemoryExtensions.cs
Searches for the first index of any value in the range between lowInclusive
and highInclusive
, inclusive.
public:
generic <typename T>
where T : IComparable<T>[System::Runtime::CompilerServices::Extension]
static int IndexOfAnyInRange(Span<T> span, T lowInclusive, T highInclusive);
public static int IndexOfAnyInRange<T> (this Span<T> span, T lowInclusive, T highInclusive) where T : IComparable<T>;
static member IndexOfAnyInRange : Span<'T (requires 'T :> IComparable<'T>)> * 'T * 'T -> int (requires 'T :> IComparable<'T>)
<Extension()>
Public Function IndexOfAnyInRange(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
- span
- Span<T>
The span to search.
- lowInclusive
- T
The lower bound, inclusive, of the range for which to search.
- highInclusive
- T
The upper bound, inclusive, of the range for which to search.
Returns
The index in the span of the first occurrence of any value in the specified range. If all of the values are outside of the specified range, returns -1.
Applies to
Atsauksmes
https://aka.ms/ContentUserFeedback.
Drīzumā: 2024. gada laikā mēs pakāpeniski pārtrauksim izmantot “GitHub problēmas” kā atsauksmju par saturu mehānismu un aizstāsim to ar jaunu atsauksmju sistēmu. Papildinformāciju skatiet:Iesniegt un skatīt atsauksmes par