MemoryExtensions.LastIndexOf MemoryExtensions.LastIndexOf MemoryExtensions.LastIndexOf MemoryExtensions.LastIndexOf Method

Definizione

Overload

LastIndexOf(ReadOnlySpan<Char>, ReadOnlySpan<Char>, StringComparison) LastIndexOf(ReadOnlySpan<Char>, ReadOnlySpan<Char>, StringComparison) LastIndexOf(ReadOnlySpan<Char>, ReadOnlySpan<Char>, StringComparison) LastIndexOf(ReadOnlySpan<Char>, ReadOnlySpan<Char>, StringComparison)

Restituisce l'indice in base zero dell'ultima occorrenza dell'oggetto value specificato nell'oggetto span corrente.Reports the zero-based index of the last occurrence of the specified value in the current span.

LastIndexOf<T>(ReadOnlySpan<T>, ReadOnlySpan<T>) LastIndexOf<T>(ReadOnlySpan<T>, ReadOnlySpan<T>) LastIndexOf<T>(ReadOnlySpan<T>, ReadOnlySpan<T>) LastIndexOf<T>(ReadOnlySpan<T>, ReadOnlySpan<T>)

Cerca la sequenza specificata e restituisce l'indice dell'ultima occorrenza.Searches for the specified sequence and returns the index of its last occurrence. I valori vengono confrontati tramite IEquatable{T}.Equals(T).Values are compared using IEquatable{T}.Equals(T).

LastIndexOf<T>(ReadOnlySpan<T>, T) LastIndexOf<T>(ReadOnlySpan<T>, T) LastIndexOf<T>(ReadOnlySpan<T>, T) LastIndexOf<T>(ReadOnlySpan<T>, T)

Cerca il valore specificato e restituisce l'indice dell'ultima occorrenza.Searches for the specified value and returns the index of its last occurrence. I valori vengono confrontati tramite IEquatable{T}.Equals(T).Values are compared using IEquatable{T}.Equals(T).

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

Cerca la sequenza specificata e restituisce l'indice dell'ultima occorrenza.Searches for the specified sequence and returns the index of its last occurrence. I valori vengono confrontati tramite IEquatable{T}.Equals(T).Values are compared using IEquatable{T}.Equals(T).

LastIndexOf<T>(Span<T>, T) LastIndexOf<T>(Span<T>, T) LastIndexOf<T>(Span<T>, T) LastIndexOf<T>(Span<T>, T)

Cerca il valore specificato e restituisce l'indice dell'ultima occorrenza.Searches for the specified value and returns the index of its last occurrence. I valori vengono confrontati tramite IEquatable{T}.Equals(T).Values are compared using IEquatable{T}.Equals(T).

LastIndexOf(ReadOnlySpan<Char>, ReadOnlySpan<Char>, StringComparison) LastIndexOf(ReadOnlySpan<Char>, ReadOnlySpan<Char>, StringComparison) LastIndexOf(ReadOnlySpan<Char>, ReadOnlySpan<Char>, StringComparison) LastIndexOf(ReadOnlySpan<Char>, ReadOnlySpan<Char>, StringComparison)

Restituisce l'indice in base zero dell'ultima occorrenza dell'oggetto value specificato nell'oggetto span corrente.Reports the zero-based index of the last occurrence of the specified value in the current span.

public:
[System::Runtime::CompilerServices::Extension]
 static int LastIndexOf(ReadOnlySpan<char> span, ReadOnlySpan<char> value, StringComparison comparisonType);
public static int LastIndexOf (this ReadOnlySpan<char> span, ReadOnlySpan<char> value, StringComparison comparisonType);
static member LastIndexOf : ReadOnlySpan<char> * ReadOnlySpan<char> * StringComparison -> int
<Extension()>
Public Function LastIndexOf (span As ReadOnlySpan(Of Char), value As ReadOnlySpan(Of Char), comparisonType As StringComparison) As Integer

Parametri

span
ReadOnlySpan<Char>

Intervallo di origine.The source span.

value
ReadOnlySpan<Char>

Valore da cercare all'interno dell'intervallo di origine.The value to seek within the source span.

comparisonType
StringComparison StringComparison StringComparison StringComparison

Valore di enumerazione che determina la modalità di confronto tra span e value.An enumeration value that determines how span and value are compared.

Restituisce

Indice dell'ultima occorrenza del valore nell'intervallo.The index of the last occurrence of the value in the span.

LastIndexOf<T>(ReadOnlySpan<T>, ReadOnlySpan<T>) LastIndexOf<T>(ReadOnlySpan<T>, ReadOnlySpan<T>) LastIndexOf<T>(ReadOnlySpan<T>, ReadOnlySpan<T>) LastIndexOf<T>(ReadOnlySpan<T>, ReadOnlySpan<T>)

Cerca la sequenza specificata e restituisce l'indice dell'ultima occorrenza.Searches for the specified sequence and returns the index of its last occurrence. I valori vengono confrontati tramite IEquatable{T}.Equals(T).Values are compared using IEquatable{T}.Equals(T).

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

Parametri di tipo

T

Tipo di span e value.The type of the span and value.

Parametri

span
ReadOnlySpan<T> ReadOnlySpan<T> ReadOnlySpan<T> ReadOnlySpan<T>

Intervallo da ricercare.The span to search.

value
ReadOnlySpan<T> ReadOnlySpan<T> ReadOnlySpan<T> ReadOnlySpan<T>

Sequenza da cercare.The sequence to search for.

Restituisce

Indice dell'ultima occorrenza del valore nell'intervallo.The index of the last occurrence of the value in the span. Se non viene trovato, restituisce -1.If not found, returns -1.

LastIndexOf<T>(ReadOnlySpan<T>, T) LastIndexOf<T>(ReadOnlySpan<T>, T) LastIndexOf<T>(ReadOnlySpan<T>, T) LastIndexOf<T>(ReadOnlySpan<T>, T)

Cerca il valore specificato e restituisce l'indice dell'ultima occorrenza.Searches for the specified value and returns the index of its last occurrence. I valori vengono confrontati tramite IEquatable{T}.Equals(T).Values are compared using IEquatable{T}.Equals(T).

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

Parametri di tipo

T

Tipo di span e value.The type of the span and value.

Parametri

span
ReadOnlySpan<T> ReadOnlySpan<T> ReadOnlySpan<T> ReadOnlySpan<T>

Intervallo da ricercare.The span to search.

value

Valore da cercare.The value to search for.

Restituisce

Indice dell'ultima occorrenza del valore nell'intervallo.The index of the last occurrence of the value in the span. Se non viene trovato, restituisce -1.If not found, returns -1.

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

Cerca la sequenza specificata e restituisce l'indice dell'ultima occorrenza.Searches for the specified sequence and returns the index of its last occurrence. I valori vengono confrontati tramite IEquatable{T}.Equals(T).Values are compared using IEquatable{T}.Equals(T).

public:
generic <typename T>
 where T : IEquatable<T>[System::Runtime::CompilerServices::Extension]
 static int LastIndexOf(Span<T> span, ReadOnlySpan<T> value);
public static int LastIndexOf<T> (this Span<T> span, ReadOnlySpan<T> value) where T : IEquatable<T>;
static member LastIndexOf : Span<'T (requires 'T :> IEquatable<'T>)> * ReadOnlySpan<'T (requires 'T :> IEquatable<'T>)> -> int (requires 'T :> IEquatable<'T>)
<Extension()>
Public Function LastIndexOf(Of T As IEquatable(Of T)) (span As Span(Of T), value As ReadOnlySpan(Of T)) As Integer

Parametri di tipo

T

Tipo di span e value.The type of the span and value.

Parametri

span
Span<T> Span<T> Span<T> Span<T>

Intervallo da ricercare.The span to search.

value
ReadOnlySpan<T> ReadOnlySpan<T> ReadOnlySpan<T> ReadOnlySpan<T>

Sequenza da cercare.The sequence to search for.

Restituisce

Indice dell'ultima occorrenza del valore nell'intervallo.The index of the last occurrence of the value in the span. Se non viene trovato, restituisce -1.If not found, returns -1.

LastIndexOf<T>(Span<T>, T) LastIndexOf<T>(Span<T>, T) LastIndexOf<T>(Span<T>, T) LastIndexOf<T>(Span<T>, T)

Cerca il valore specificato e restituisce l'indice dell'ultima occorrenza.Searches for the specified value and returns the index of its last occurrence. I valori vengono confrontati tramite IEquatable{T}.Equals(T).Values are compared using IEquatable{T}.Equals(T).

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

Parametri di tipo

T

Tipo di span e value.The type of the span and value.

Parametri

span
Span<T> Span<T> Span<T> Span<T>

Intervallo da ricercare.The span to search.

value

Valore da cercare.The value to search for.

Restituisce

Indice dell'ultima occorrenza del valore nell'intervallo.The index of the last occurrence of the value in the span. Se non viene trovato, restituisce -1.If not found, returns -1.

Si applica a