MemoryExtensions.LastIndexOfAnyExcept 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
| LastIndexOfAnyExcept<T>(ReadOnlySpan<T>, T, T) |
Searches for the last index of any value other than the specified |
| LastIndexOfAnyExcept<T>(ReadOnlySpan<T>, T, T, T, IEqualityComparer<T>) |
Searches for the last index of any value other than the specified |
| LastIndexOfAnyExcept<T>(Span<T>, T, T, T) |
Searches for the last index of any value other than the specified |
| LastIndexOfAnyExcept<T>(ReadOnlySpan<T>, T, T, IEqualityComparer<T>) |
Searches for the last index of any value other than the specified |
| LastIndexOfAnyExcept<T>(Span<T>, T, T) |
Searches for the last index of any value other than the specified |
| LastIndexOfAnyExcept<T>(ReadOnlySpan<T>, T, IEqualityComparer<T>) |
Searches for the last index of any value other than the specified |
| LastIndexOfAnyExcept<T>(ReadOnlySpan<T>, T, T, T) |
Searches for the last index of any value other than the specified |
| LastIndexOfAnyExcept<T>(Span<T>, T) |
Searches for the last index of any value other than the specified |
| LastIndexOfAnyExcept<T>(Span<T>, ReadOnlySpan<T>) |
Searches for the last index of any value other than the specified |
| LastIndexOfAnyExcept<T>(Span<T>, SearchValues<T>) |
Searches for the last index of any value other than the specified |
| LastIndexOfAnyExcept<T>(ReadOnlySpan<T>, T) |
Searches for the last index of any value other than the specified |
| LastIndexOfAnyExcept<T>(ReadOnlySpan<T>, ReadOnlySpan<T>, IEqualityComparer<T>) |
Searches for the last index of any value other than the specified |
| LastIndexOfAnyExcept<T>(ReadOnlySpan<T>, ReadOnlySpan<T>) |
Searches for the last index of any value other than the specified |
| LastIndexOfAnyExcept<T>(ReadOnlySpan<T>, SearchValues<T>) |
Searches for the last index of any value other than the specified |
LastIndexOfAnyExcept<T>(ReadOnlySpan<T>, T, T)
- Source:
- MemoryExtensions.cs
- Source:
- MemoryExtensions.cs
- Source:
- MemoryExtensions.cs
- Source:
- MemoryExtensions.cs
Searches for the last index of any value other than the specified value0 or value1.
public:
generic <typename T>
where T : IEquatable<T>[System::Runtime::CompilerServices::Extension]
static int LastIndexOfAnyExcept(ReadOnlySpan<T> span, T value0, T value1);
public static int LastIndexOfAnyExcept<T>(this ReadOnlySpan<T> span, T value0, T value1) where T : IEquatable<T>;
static member LastIndexOfAnyExcept : ReadOnlySpan<'T (requires 'T :> IEquatable<'T>)> * 'T * 'T -> int (requires 'T :> IEquatable<'T>)
<Extension()>
Public Function LastIndexOfAnyExcept(Of T As IEquatable(Of T)) (span As ReadOnlySpan(Of T), value0 As T, value1 As T) As Integer
Type Parameters
- T
The type of the span and values.
Parameters
- span
- ReadOnlySpan<T>
The span to search.
- value0
- T
The first value to avoid.
- value1
- T
The second value to avoid.
Returns
The index in the span of the last occurrence of any value other than value0 and value1.
If all of the values are value0 or value1, returns -1.
Applies to
LastIndexOfAnyExcept<T>(ReadOnlySpan<T>, T, T, T, IEqualityComparer<T>)
- Source:
- MemoryExtensions.cs
Searches for the last index of any value other than the specified value0, value1, or value2.
public static int LastIndexOfAnyExcept<T>(this ReadOnlySpan<T> span, T value0, T value1, T value2, System.Collections.Generic.IEqualityComparer<T>? comparer = default);
static member LastIndexOfAnyExcept : ReadOnlySpan<'T> * 'T * 'T * 'T * System.Collections.Generic.IEqualityComparer<'T> -> int
<Extension()>
Public Function LastIndexOfAnyExcept(Of T) (span As ReadOnlySpan(Of T), value0 As T, value1 As T, value2 As T, Optional comparer As IEqualityComparer(Of T) = Nothing) As Integer
Type Parameters
- T
The type of the span and values.
Parameters
- span
- ReadOnlySpan<T>
The span to search.
- value0
- T
The first value to avoid.
- value1
- T
The second value to avoid.
- value2
- T
The third value to avoid.
- comparer
- IEqualityComparer<T>
The IEqualityComparer<T> implementation to use when comparing elements, or null to use the default IEqualityComparer<T> for the type of an element.
Returns
The index in the span of the last occurrence of any value other than value0, value1, and value2.
If all of the values are value0, value1, and value2, returns -1.
Applies to
LastIndexOfAnyExcept<T>(Span<T>, T, T, T)
- Source:
- MemoryExtensions.cs
- Source:
- MemoryExtensions.cs
- Source:
- MemoryExtensions.cs
- Source:
- MemoryExtensions.cs
Searches for the last index of any value other than the specified value0, value1, or value2.
public:
generic <typename T>
where T : IEquatable<T>[System::Runtime::CompilerServices::Extension]
static int LastIndexOfAnyExcept(Span<T> span, T value0, T value1, T value2);
[System.Runtime.CompilerServices.OverloadResolutionPriority(-1)]
public static int LastIndexOfAnyExcept<T>(this Span<T> span, T value0, T value1, T value2) where T : IEquatable<T>;
public static int LastIndexOfAnyExcept<T>(this Span<T> span, T value0, T value1, T value2) where T : IEquatable<T>;
[<System.Runtime.CompilerServices.OverloadResolutionPriority(-1)>]
static member LastIndexOfAnyExcept : Span<'T (requires 'T :> IEquatable<'T>)> * 'T * 'T * 'T -> int (requires 'T :> IEquatable<'T>)
static member LastIndexOfAnyExcept : Span<'T (requires 'T :> IEquatable<'T>)> * 'T * 'T * 'T -> int (requires 'T :> IEquatable<'T>)
<Extension()>
Public Function LastIndexOfAnyExcept(Of T As IEquatable(Of T)) (span As Span(Of T), value0 As T, value1 As T, value2 As T) As Integer
Type Parameters
- T
The type of the span and values.
Parameters
- span
- Span<T>
The span to search.
- value0
- T
The first value to avoid.
- value1
- T
The second value to avoid.
- value2
- T
The third value to avoid.
Returns
The index in the span of the last occurrence of any value other than value0, value1, and value2.
If all of the values are value0, value1, and value2, returns -1.
- Attributes
Applies to
LastIndexOfAnyExcept<T>(ReadOnlySpan<T>, T, T, IEqualityComparer<T>)
- Source:
- MemoryExtensions.cs
Searches for the last index of any value other than the specified value0 or value1.
public static int LastIndexOfAnyExcept<T>(this ReadOnlySpan<T> span, T value0, T value1, System.Collections.Generic.IEqualityComparer<T>? comparer = default);
static member LastIndexOfAnyExcept : ReadOnlySpan<'T> * 'T * 'T * System.Collections.Generic.IEqualityComparer<'T> -> int
<Extension()>
Public Function LastIndexOfAnyExcept(Of T) (span As ReadOnlySpan(Of T), value0 As T, value1 As T, Optional comparer As IEqualityComparer(Of T) = Nothing) As Integer
Type Parameters
- T
The type of the span and values.
Parameters
- span
- ReadOnlySpan<T>
The span to search.
- value0
- T
The first value to avoid.
- value1
- T
The second value to avoid.
- comparer
- IEqualityComparer<T>
The IEqualityComparer<T> implementation to use when comparing elements, or null to use the default IEqualityComparer<T> for the type of an element.
Returns
The index in the span of the last occurrence of any value other than value0 and value1.
If all of the values are value0 or value1, returns -1.
Applies to
LastIndexOfAnyExcept<T>(Span<T>, T, T)
- Source:
- MemoryExtensions.cs
- Source:
- MemoryExtensions.cs
- Source:
- MemoryExtensions.cs
- Source:
- MemoryExtensions.cs
Searches for the last index of any value other than the specified value0 or value1.
public:
generic <typename T>
where T : IEquatable<T>[System::Runtime::CompilerServices::Extension]
static int LastIndexOfAnyExcept(Span<T> span, T value0, T value1);
[System.Runtime.CompilerServices.OverloadResolutionPriority(-1)]
public static int LastIndexOfAnyExcept<T>(this Span<T> span, T value0, T value1) where T : IEquatable<T>;
public static int LastIndexOfAnyExcept<T>(this Span<T> span, T value0, T value1) where T : IEquatable<T>;
[<System.Runtime.CompilerServices.OverloadResolutionPriority(-1)>]
static member LastIndexOfAnyExcept : Span<'T (requires 'T :> IEquatable<'T>)> * 'T * 'T -> int (requires 'T :> IEquatable<'T>)
static member LastIndexOfAnyExcept : Span<'T (requires 'T :> IEquatable<'T>)> * 'T * 'T -> int (requires 'T :> IEquatable<'T>)
<Extension()>
Public Function LastIndexOfAnyExcept(Of T As IEquatable(Of T)) (span As Span(Of T), value0 As T, value1 As T) As Integer
Type Parameters
- T
The type of the span and values.
Parameters
- span
- Span<T>
The span to search.
- value0
- T
The first value to avoid.
- value1
- T
The second value to avoid.
Returns
The index in the span of the last occurrence of any value other than value0 and value1.
If all of the values are value0 or value1, returns -1.
- Attributes
Applies to
LastIndexOfAnyExcept<T>(ReadOnlySpan<T>, T, IEqualityComparer<T>)
- Source:
- MemoryExtensions.cs
Searches for the last index of any value other than the specified value.
public static int LastIndexOfAnyExcept<T>(this ReadOnlySpan<T> span, T value, System.Collections.Generic.IEqualityComparer<T>? comparer = default);
static member LastIndexOfAnyExcept : ReadOnlySpan<'T> * 'T * System.Collections.Generic.IEqualityComparer<'T> -> int
<Extension()>
Public Function LastIndexOfAnyExcept(Of T) (span As ReadOnlySpan(Of T), value As T, Optional comparer As IEqualityComparer(Of T) = Nothing) As Integer
Type Parameters
- T
The type of the span and values.
Parameters
- span
- ReadOnlySpan<T>
The span to search.
- value
- T
The value to avoid.
- comparer
- IEqualityComparer<T>
The IEqualityComparer<T> implementation to use when comparing elements, or null to use the default IEqualityComparer<T> for the type of an element.
Returns
The index in the span of the last occurrence of any value other than value.
If all of the values are value, returns -1.
Applies to
LastIndexOfAnyExcept<T>(ReadOnlySpan<T>, T, T, T)
- Source:
- MemoryExtensions.cs
- Source:
- MemoryExtensions.cs
- Source:
- MemoryExtensions.cs
- Source:
- MemoryExtensions.cs
Searches for the last index of any value other than the specified value0, value1, or value2.
public:
generic <typename T>
where T : IEquatable<T>[System::Runtime::CompilerServices::Extension]
static int LastIndexOfAnyExcept(ReadOnlySpan<T> span, T value0, T value1, T value2);
public static int LastIndexOfAnyExcept<T>(this ReadOnlySpan<T> span, T value0, T value1, T value2) where T : IEquatable<T>;
static member LastIndexOfAnyExcept : ReadOnlySpan<'T (requires 'T :> IEquatable<'T>)> * 'T * 'T * 'T -> int (requires 'T :> IEquatable<'T>)
<Extension()>
Public Function LastIndexOfAnyExcept(Of T As IEquatable(Of T)) (span As ReadOnlySpan(Of T), value0 As T, value1 As T, value2 As T) As Integer
Type Parameters
- T
The type of the span and values.
Parameters
- span
- ReadOnlySpan<T>
The span to search.
- value0
- T
The first value to avoid.
- value1
- T
The second value to avoid.
- value2
- T
The third value to avoid.
Returns
The index in the span of the last occurrence of any value other than value0, value1, and value2.
If all of the values are value0, value1, and value2, returns -1.
Applies to
LastIndexOfAnyExcept<T>(Span<T>, T)
- Source:
- MemoryExtensions.cs
- Source:
- MemoryExtensions.cs
- Source:
- MemoryExtensions.cs
- Source:
- MemoryExtensions.cs
Searches for the last index of any value other than the specified value.
public:
generic <typename T>
where T : IEquatable<T>[System::Runtime::CompilerServices::Extension]
static int LastIndexOfAnyExcept(Span<T> span, T value);
[System.Runtime.CompilerServices.OverloadResolutionPriority(-1)]
public static int LastIndexOfAnyExcept<T>(this Span<T> span, T value) where T : IEquatable<T>;
public static int LastIndexOfAnyExcept<T>(this Span<T> span, T value) where T : IEquatable<T>;
[<System.Runtime.CompilerServices.OverloadResolutionPriority(-1)>]
static member LastIndexOfAnyExcept : Span<'T (requires 'T :> IEquatable<'T>)> * 'T -> int (requires 'T :> IEquatable<'T>)
static member LastIndexOfAnyExcept : Span<'T (requires 'T :> IEquatable<'T>)> * 'T -> int (requires 'T :> IEquatable<'T>)
<Extension()>
Public Function LastIndexOfAnyExcept(Of T As IEquatable(Of T)) (span As Span(Of T), value As T) As Integer
Type Parameters
- T
The type of the span and values.
Parameters
- span
- Span<T>
The span to search.
- value
- T
The value to avoid.
Returns
The index in the span of the last occurrence of any value other than value.
If all of the values are value, returns -1.
- Attributes
Applies to
LastIndexOfAnyExcept<T>(Span<T>, ReadOnlySpan<T>)
- Source:
- MemoryExtensions.cs
- Source:
- MemoryExtensions.cs
- Source:
- MemoryExtensions.cs
- Source:
- MemoryExtensions.cs
Searches for the last index of any value other than the specified values.
public:
generic <typename T>
where T : IEquatable<T>[System::Runtime::CompilerServices::Extension]
static int LastIndexOfAnyExcept(Span<T> span, ReadOnlySpan<T> values);
[System.Runtime.CompilerServices.OverloadResolutionPriority(-1)]
public static int LastIndexOfAnyExcept<T>(this Span<T> span, ReadOnlySpan<T> values) where T : IEquatable<T>;
public static int LastIndexOfAnyExcept<T>(this Span<T> span, ReadOnlySpan<T> values) where T : IEquatable<T>;
[<System.Runtime.CompilerServices.OverloadResolutionPriority(-1)>]
static member LastIndexOfAnyExcept : Span<'T (requires 'T :> IEquatable<'T>)> * ReadOnlySpan<'T (requires 'T :> IEquatable<'T>)> -> int (requires 'T :> IEquatable<'T>)
static member LastIndexOfAnyExcept : Span<'T (requires 'T :> IEquatable<'T>)> * ReadOnlySpan<'T (requires 'T :> IEquatable<'T>)> -> int (requires 'T :> IEquatable<'T>)
<Extension()>
Public Function LastIndexOfAnyExcept(Of T As IEquatable(Of T)) (span As Span(Of T), values As ReadOnlySpan(Of T)) As Integer
Type Parameters
- T
The type of the span and values.
Parameters
- span
- Span<T>
The span to search.
- values
- ReadOnlySpan<T>
The values to avoid.
Returns
The index in the span of the last occurrence of any value other than those in values.
If all of the values are in values, returns -1.
- Attributes
Applies to
LastIndexOfAnyExcept<T>(Span<T>, SearchValues<T>)
- Source:
- MemoryExtensions.cs
- Source:
- MemoryExtensions.cs
- Source:
- MemoryExtensions.cs
Searches for the last index of any value other than the specified values.
public:
generic <typename T>
where T : IEquatable<T>[System::Runtime::CompilerServices::Extension]
static int LastIndexOfAnyExcept(Span<T> span, System::Buffers::SearchValues<T> ^ values);
[System.Runtime.CompilerServices.OverloadResolutionPriority(-1)]
public static int LastIndexOfAnyExcept<T>(this Span<T> span, System.Buffers.SearchValues<T> values) where T : IEquatable<T>;
public static int LastIndexOfAnyExcept<T>(this Span<T> span, System.Buffers.SearchValues<T> values) where T : IEquatable<T>;
[<System.Runtime.CompilerServices.OverloadResolutionPriority(-1)>]
static member LastIndexOfAnyExcept : Span<'T (requires 'T :> IEquatable<'T>)> * System.Buffers.SearchValues<'T (requires 'T :> IEquatable<'T>)> -> int (requires 'T :> IEquatable<'T>)
static member LastIndexOfAnyExcept : Span<'T (requires 'T :> IEquatable<'T>)> * System.Buffers.SearchValues<'T (requires 'T :> IEquatable<'T>)> -> int (requires 'T :> IEquatable<'T>)
<Extension()>
Public Function LastIndexOfAnyExcept(Of T As IEquatable(Of T)) (span As Span(Of T), values As SearchValues(Of T)) As Integer
Type Parameters
- T
The type of the span and values.
Parameters
- span
- Span<T>
The span to search.
- values
- SearchValues<T>
The values to exclude from the search.
Returns
The index in the span of the last occurrence of any value other than those in values.
If all of the values are in values, returns -1.
- Attributes
Applies to
LastIndexOfAnyExcept<T>(ReadOnlySpan<T>, T)
- Source:
- MemoryExtensions.cs
- Source:
- MemoryExtensions.cs
- Source:
- MemoryExtensions.cs
- Source:
- MemoryExtensions.cs
Searches for the last index of any value other than the specified value.
public:
generic <typename T>
where T : IEquatable<T>[System::Runtime::CompilerServices::Extension]
static int LastIndexOfAnyExcept(ReadOnlySpan<T> span, T value);
public static int LastIndexOfAnyExcept<T>(this ReadOnlySpan<T> span, T value) where T : IEquatable<T>;
static member LastIndexOfAnyExcept : ReadOnlySpan<'T (requires 'T :> IEquatable<'T>)> * 'T -> int (requires 'T :> IEquatable<'T>)
<Extension()>
Public Function LastIndexOfAnyExcept(Of T As IEquatable(Of T)) (span As ReadOnlySpan(Of T), value As T) As Integer
Type Parameters
- T
The type of the span and values.
Parameters
- span
- ReadOnlySpan<T>
The span to search.
- value
- T
The value to avoid.
Returns
The index in the span of the last occurrence of any value other than value.
If all of the values are value, returns -1.
Applies to
LastIndexOfAnyExcept<T>(ReadOnlySpan<T>, ReadOnlySpan<T>, IEqualityComparer<T>)
- Source:
- MemoryExtensions.cs
Searches for the last index of any value other than the specified values.
public static int LastIndexOfAnyExcept<T>(this ReadOnlySpan<T> span, ReadOnlySpan<T> values, System.Collections.Generic.IEqualityComparer<T>? comparer = default);
static member LastIndexOfAnyExcept : ReadOnlySpan<'T> * ReadOnlySpan<'T> * System.Collections.Generic.IEqualityComparer<'T> -> int
<Extension()>
Public Function LastIndexOfAnyExcept(Of T) (span As ReadOnlySpan(Of T), values As ReadOnlySpan(Of T), Optional comparer As IEqualityComparer(Of T) = Nothing) As Integer
Type Parameters
- T
The type of the span and values.
Parameters
- span
- ReadOnlySpan<T>
The span to search.
- values
- ReadOnlySpan<T>
The values to avoid.
- comparer
- IEqualityComparer<T>
The IEqualityComparer<T> implementation to use when comparing elements, or null to use the default IEqualityComparer<T> for the type of an element.
Returns
The index in the span of the first occurrence of any value other than those in values.
If all of the values are in values, returns -1.
Applies to
LastIndexOfAnyExcept<T>(ReadOnlySpan<T>, ReadOnlySpan<T>)
- Source:
- MemoryExtensions.cs
- Source:
- MemoryExtensions.cs
- Source:
- MemoryExtensions.cs
- Source:
- MemoryExtensions.cs
Searches for the last index of any value other than the specified values.
public:
generic <typename T>
where T : IEquatable<T>[System::Runtime::CompilerServices::Extension]
static int LastIndexOfAnyExcept(ReadOnlySpan<T> span, ReadOnlySpan<T> values);
public static int LastIndexOfAnyExcept<T>(this ReadOnlySpan<T> span, ReadOnlySpan<T> values) where T : IEquatable<T>;
static member LastIndexOfAnyExcept : ReadOnlySpan<'T (requires 'T :> IEquatable<'T>)> * ReadOnlySpan<'T (requires 'T :> IEquatable<'T>)> -> int (requires 'T :> IEquatable<'T>)
<Extension()>
Public Function LastIndexOfAnyExcept(Of T As IEquatable(Of T)) (span As ReadOnlySpan(Of T), values As ReadOnlySpan(Of T)) As Integer
Type Parameters
- T
The type of the span and values.
Parameters
- span
- ReadOnlySpan<T>
The span to search.
- values
- ReadOnlySpan<T>
The values to avoid.
Returns
The index in the span of the first occurrence of any value other than those in values.
If all of the values are in values, returns -1.
Applies to
LastIndexOfAnyExcept<T>(ReadOnlySpan<T>, SearchValues<T>)
- Source:
- MemoryExtensions.cs
- Source:
- MemoryExtensions.cs
- Source:
- MemoryExtensions.cs
Searches for the last index of any value other than the specified values.
public:
generic <typename T>
where T : IEquatable<T>[System::Runtime::CompilerServices::Extension]
static int LastIndexOfAnyExcept(ReadOnlySpan<T> span, System::Buffers::SearchValues<T> ^ values);
public static int LastIndexOfAnyExcept<T>(this ReadOnlySpan<T> span, System.Buffers.SearchValues<T> values) where T : IEquatable<T>;
static member LastIndexOfAnyExcept : ReadOnlySpan<'T (requires 'T :> IEquatable<'T>)> * System.Buffers.SearchValues<'T (requires 'T :> IEquatable<'T>)> -> int (requires 'T :> IEquatable<'T>)
<Extension()>
Public Function LastIndexOfAnyExcept(Of T As IEquatable(Of T)) (span As ReadOnlySpan(Of T), values As SearchValues(Of T)) As Integer
Type Parameters
- T
The type of the span and values.
Parameters
- span
- ReadOnlySpan<T>
The span to search.
- values
- SearchValues<T>
The values to exclude from the search.
Returns
The index in the span of the last occurrence of any value other than those in values.
If all of the values are in values, returns -1.