Επεξεργασία

Κοινή χρήση μέσω


MemoryExtensions.LastIndexOfAny Method

Definition

Overloads

LastIndexOfAny<T>(Span<T>, T, T, T)

Searches for the last index of any of the specified values similar to calling LastIndexOf several times with the logical OR operator.

LastIndexOfAny<T>(ReadOnlySpan<T>, T, T, T)

Searches for the last index of any of the specified values similar to calling LastIndexOf several times with the logical OR operator.

LastIndexOfAny<T>(Span<T>, T, T)

Searches for the last index of any of the specified values similar to calling LastIndexOf several times with the logical OR operator.

LastIndexOfAny<T>(ReadOnlySpan<T>, T, T)

Searches for the last index of any of the specified values similar to calling LastIndexOf several times with the logical OR operator.

LastIndexOfAny<T>(Span<T>, ReadOnlySpan<T>)

Searches for the last index of any of the specified values similar to calling LastIndexOf several times with the logical OR operator.

LastIndexOfAny<T>(Span<T>, SearchValues<T>)

Searches for the last index of any of the specified values.

LastIndexOfAny<T>(ReadOnlySpan<T>, ReadOnlySpan<T>)

Searches for the last index of any of the specified values similar to calling LastIndexOf several times with the logical OR operator.

LastIndexOfAny<T>(ReadOnlySpan<T>, SearchValues<T>)

Searches for the last index of any of the specified values.

LastIndexOfAny<T>(Span<T>, T, T, T)

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

Searches for the last index of any of the specified values similar to calling LastIndexOf several times with the logical OR operator.

public:
generic <typename T>
 where T : IEquatable<T>[System::Runtime::CompilerServices::Extension]
 static int LastIndexOfAny(Span<T> span, T value0, T value1, T value2);
public static int LastIndexOfAny<T> (this Span<T> span, T value0, T value1, T value2) where T : IEquatable<T>;
static member LastIndexOfAny : Span<'T (requires 'T :> IEquatable<'T>)> * 'T * 'T * 'T -> int (requires 'T :> IEquatable<'T>)
<Extension()>
Public Function LastIndexOfAny(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

One of the values to search for.

value1
T

One of the values to search for.

value2
T

One of the values to search for.

Returns

The index of the last occurrence of any of the values in the span. If not found, returns -1.

Applies to

LastIndexOfAny<T>(ReadOnlySpan<T>, T, T, T)

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

Searches for the last index of any of the specified values similar to calling LastIndexOf several times with the logical OR operator.

public:
generic <typename T>
 where T : IEquatable<T>[System::Runtime::CompilerServices::Extension]
 static int LastIndexOfAny(ReadOnlySpan<T> span, T value0, T value1, T value2);
public static int LastIndexOfAny<T> (this ReadOnlySpan<T> span, T value0, T value1, T value2) where T : IEquatable<T>;
static member LastIndexOfAny : ReadOnlySpan<'T (requires 'T :> IEquatable<'T>)> * 'T * 'T * 'T -> int (requires 'T :> IEquatable<'T>)
<Extension()>
Public Function LastIndexOfAny(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

One of the values to search for.

value1
T

One of the values to search for.

value2
T

One of the values to search for.

Returns

The index of the last occurrence of any of the values in the span. If not found, returns -1.

Applies to

LastIndexOfAny<T>(Span<T>, T, T)

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

Searches for the last index of any of the specified values similar to calling LastIndexOf several times with the logical OR operator.

public:
generic <typename T>
 where T : IEquatable<T>[System::Runtime::CompilerServices::Extension]
 static int LastIndexOfAny(Span<T> span, T value0, T value1);
public static int LastIndexOfAny<T> (this Span<T> span, T value0, T value1) where T : IEquatable<T>;
static member LastIndexOfAny : Span<'T (requires 'T :> IEquatable<'T>)> * 'T * 'T -> int (requires 'T :> IEquatable<'T>)
<Extension()>
Public Function LastIndexOfAny(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

One of the values to search for.

value1
T

One of the values to search for.

Returns

The index of the last occurrence of any of the values in the span. If not found, returns -1.

Applies to

LastIndexOfAny<T>(ReadOnlySpan<T>, T, T)

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

Searches for the last index of any of the specified values similar to calling LastIndexOf several times with the logical OR operator.

public:
generic <typename T>
 where T : IEquatable<T>[System::Runtime::CompilerServices::Extension]
 static int LastIndexOfAny(ReadOnlySpan<T> span, T value0, T value1);
public static int LastIndexOfAny<T> (this ReadOnlySpan<T> span, T value0, T value1) where T : IEquatable<T>;
static member LastIndexOfAny : ReadOnlySpan<'T (requires 'T :> IEquatable<'T>)> * 'T * 'T -> int (requires 'T :> IEquatable<'T>)
<Extension()>
Public Function LastIndexOfAny(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

One of the values to search for.

value1
T

One of the values to search for.

Returns

The index of the last occurrence of any of the values in the span. If not found, returns -1.

Applies to

LastIndexOfAny<T>(Span<T>, ReadOnlySpan<T>)

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

Searches for the last index of any of the specified values similar to calling LastIndexOf several times with the logical OR operator.

public:
generic <typename T>
 where T : IEquatable<T>[System::Runtime::CompilerServices::Extension]
 static int LastIndexOfAny(Span<T> span, ReadOnlySpan<T> values);
public static int LastIndexOfAny<T> (this Span<T> span, ReadOnlySpan<T> values) where T : IEquatable<T>;
static member LastIndexOfAny : Span<'T (requires 'T :> IEquatable<'T>)> * ReadOnlySpan<'T (requires 'T :> IEquatable<'T>)> -> int (requires 'T :> IEquatable<'T>)
<Extension()>
Public Function LastIndexOfAny(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 set of values to search for.

Returns

The index of the last occurrence of any of the values in the span. If not found, returns -1.

Applies to

LastIndexOfAny<T>(Span<T>, SearchValues<T>)

Source:
MemoryExtensions.cs
Source:
MemoryExtensions.cs

Searches for the last index of any of the specified values.

public:
generic <typename T>
 where T : IEquatable<T>[System::Runtime::CompilerServices::Extension]
 static int LastIndexOfAny(Span<T> span, System::Buffers::SearchValues<T> ^ values);
public static int LastIndexOfAny<T> (this Span<T> span, System.Buffers.SearchValues<T> values) where T : IEquatable<T>;
static member LastIndexOfAny : Span<'T (requires 'T :> IEquatable<'T>)> * System.Buffers.SearchValues<'T (requires 'T :> IEquatable<'T>)> -> int (requires 'T :> IEquatable<'T>)
<Extension()>
Public Function LastIndexOfAny(Of T As IEquatable(Of T)) (span As Span(Of T), values As SearchValues(Of T)) As Integer

Type Parameters

T

Parameters

span
Span<T>

The span to search.

values
SearchValues<T>

The set of values to search for.

Returns

The last index of any of the specified values, or -1 if none are found.

Remarks

This method is similar to calling LastIndexOf several times with the logical OR operator.

Applies to

LastIndexOfAny<T>(ReadOnlySpan<T>, ReadOnlySpan<T>)

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

Searches for the last index of any of the specified values similar to calling LastIndexOf several times with the logical OR operator.

public:
generic <typename T>
 where T : IEquatable<T>[System::Runtime::CompilerServices::Extension]
 static int LastIndexOfAny(ReadOnlySpan<T> span, ReadOnlySpan<T> values);
public static int LastIndexOfAny<T> (this ReadOnlySpan<T> span, ReadOnlySpan<T> values) where T : IEquatable<T>;
static member LastIndexOfAny : ReadOnlySpan<'T (requires 'T :> IEquatable<'T>)> * ReadOnlySpan<'T (requires 'T :> IEquatable<'T>)> -> int (requires 'T :> IEquatable<'T>)
<Extension()>
Public Function LastIndexOfAny(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 set of values to search for.

Returns

The index of the last occurrence of any of the values in the span. If not found, returns -1.

Applies to

LastIndexOfAny<T>(ReadOnlySpan<T>, SearchValues<T>)

Source:
MemoryExtensions.cs
Source:
MemoryExtensions.cs

Searches for the last index of any of the specified values.

public:
generic <typename T>
 where T : IEquatable<T>[System::Runtime::CompilerServices::Extension]
 static int LastIndexOfAny(ReadOnlySpan<T> span, System::Buffers::SearchValues<T> ^ values);
public static int LastIndexOfAny<T> (this ReadOnlySpan<T> span, System.Buffers.SearchValues<T> values) where T : IEquatable<T>;
static member LastIndexOfAny : ReadOnlySpan<'T (requires 'T :> IEquatable<'T>)> * System.Buffers.SearchValues<'T (requires 'T :> IEquatable<'T>)> -> int (requires 'T :> IEquatable<'T>)
<Extension()>
Public Function LastIndexOfAny(Of T As IEquatable(Of T)) (span As ReadOnlySpan(Of T), values As SearchValues(Of T)) As Integer

Type Parameters

T

Parameters

span
ReadOnlySpan<T>

The span to search.

values
SearchValues<T>

The set of values to search for.

Returns

The last index of any of the specified values, or -1 if none are found.

Remarks

This method is similar to calling LastIndexOf several times with the logical OR operator.

Applies to