MemoryExtensions.IndexOf MemoryExtensions.IndexOf MemoryExtensions.IndexOf MemoryExtensions.IndexOf Method

Definizione

Overload

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

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

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

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

IndexOf<T>(Span<T>, T) IndexOf<T>(Span<T>, T) IndexOf<T>(Span<T>, T) IndexOf<T>(Span<T>, T)

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

IndexOf<T>(ReadOnlySpan<T>, T) IndexOf<T>(ReadOnlySpan<T>, T) IndexOf<T>(ReadOnlySpan<T>, T) IndexOf<T>(ReadOnlySpan<T>, T)

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

IndexOf<T>(ReadOnlySpan<T>, ReadOnlySpan<T>) IndexOf<T>(ReadOnlySpan<T>, ReadOnlySpan<T>) IndexOf<T>(ReadOnlySpan<T>, ReadOnlySpan<T>) IndexOf<T>(ReadOnlySpan<T>, ReadOnlySpan<T>)

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

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

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

public:
[System::Runtime::CompilerServices::Extension]
 static int IndexOf(ReadOnlySpan<char> span, ReadOnlySpan<char> value, StringComparison comparisonType);
public static int IndexOf (this ReadOnlySpan<char> span, ReadOnlySpan<char> value, StringComparison comparisonType);
static member IndexOf : ReadOnlySpan<char> * ReadOnlySpan<char> * StringComparison -> int
<Extension()>
Public Function IndexOf (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'occorrenza del valore nell'intervallo.The index of the occurrence of the value in the span.

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

Cerca la sequenza specificata e restituisce l'indice della prima occorrenza.Searches for the specified sequence and returns the index of its first 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 IndexOf(Span<T> span, ReadOnlySpan<T> value);
public static int IndexOf<T> (this Span<T> span, ReadOnlySpan<T> value) where T : IEquatable<T>;
static member IndexOf : Span<'T (requires 'T :> IEquatable<'T>)> * ReadOnlySpan<'T (requires 'T :> IEquatable<'T>)> -> int (requires 'T :> IEquatable<'T>)
<Extension()>
Public Function IndexOf(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'occorrenza del valore nell'intervallo.The index of the occurrence of the value in the span. Se non viene trovato, restituisce -1.If not found, returns -1.

IndexOf<T>(Span<T>, T) IndexOf<T>(Span<T>, T) IndexOf<T>(Span<T>, T) IndexOf<T>(Span<T>, T)

Cerca il valore specificato e restituisce l'indice della prima occorrenza.Searches for the specified value and returns the index of its first 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 IndexOf(Span<T> span, T value);
public static int IndexOf<T> (this Span<T> span, T value) where T : IEquatable<T>;
static member IndexOf : Span<'T (requires 'T :> IEquatable<'T>)> * 'T -> int (requires 'T :> IEquatable<'T>)
<Extension()>
Public Function IndexOf(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'occorrenza del valore nell'intervallo.The index of the occurrence of the value in the span. Se non viene trovato, restituisce -1.If not found, returns -1.

IndexOf<T>(ReadOnlySpan<T>, T) IndexOf<T>(ReadOnlySpan<T>, T) IndexOf<T>(ReadOnlySpan<T>, T) IndexOf<T>(ReadOnlySpan<T>, T)

Cerca il valore specificato e restituisce l'indice della prima occorrenza.Searches for the specified value and returns the index of its first 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 IndexOf(ReadOnlySpan<T> span, T value);
public static int IndexOf<T> (this ReadOnlySpan<T> span, T value) where T : IEquatable<T>;
static member IndexOf : ReadOnlySpan<'T (requires 'T :> IEquatable<'T>)> * 'T -> int (requires 'T :> IEquatable<'T>)
<Extension()>
Public Function IndexOf(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'occorrenza del valore nell'intervallo.The index of the occurrence of the value in the span. Se non viene trovato, restituisce -1.If not found, returns -1.

IndexOf<T>(ReadOnlySpan<T>, ReadOnlySpan<T>) IndexOf<T>(ReadOnlySpan<T>, ReadOnlySpan<T>) IndexOf<T>(ReadOnlySpan<T>, ReadOnlySpan<T>) IndexOf<T>(ReadOnlySpan<T>, ReadOnlySpan<T>)

Cerca la sequenza specificata e restituisce l'indice della prima occorrenza.Searches for the specified sequence and returns the index of its first 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 IndexOf(ReadOnlySpan<T> span, ReadOnlySpan<T> value);
public static int IndexOf<T> (this ReadOnlySpan<T> span, ReadOnlySpan<T> value) where T : IEquatable<T>;
static member IndexOf : ReadOnlySpan<'T (requires 'T :> IEquatable<'T>)> * ReadOnlySpan<'T (requires 'T :> IEquatable<'T>)> -> int (requires 'T :> IEquatable<'T>)
<Extension()>
Public Function IndexOf(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'occorrenza del valore nell'intervallo.The index of the occurrence of the value in the span. Se non viene trovato, restituisce -1.If not found, returns -1.

Si applica a