MemoryExtensions.Contains MemoryExtensions.Contains MemoryExtensions.Contains MemoryExtensions.Contains Method

Definizione

Overload

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

Indica se un valore specificato è presente all'interno di un intervallo di caratteri di sola lettura.Indicates whether a specified value occurs within a read-only character span.

Contains<T>(ReadOnlySpan<T>, T) Contains<T>(ReadOnlySpan<T>, T) Contains<T>(ReadOnlySpan<T>, T) Contains<T>(ReadOnlySpan<T>, T)

Indica se un valore specificato viene trovato in un intervallo di sola lettura.Indicates whether a specified value is found in a read-only span. I valori vengono confrontati tramite IEquatable{T}.Equals(T).Values are compared using IEquatable{T}.Equals(T).

Contains<T>(Span<T>, T) Contains<T>(Span<T>, T) Contains<T>(Span<T>, T) Contains<T>(Span<T>, T)

Indica se un valore specificato viene trovato in un intervallo.Indicates whether a specified value is found in a span. I valori vengono confrontati tramite IEquatable{T}.Equals(T).Values are compared using IEquatable{T}.Equals(T).

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

Indica se un valore specificato è presente all'interno di un intervallo di caratteri di sola lettura.Indicates whether a specified value occurs within a read-only character span.

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

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 dei caratteri tra span e value.An enumeration value that determines how the characters in span and value are compared.

Restituisce

true se value è presente all'interno dell'intervallo; in caso contrario, false.true if value occurs within the span, false otherwise.

Contains<T>(ReadOnlySpan<T>, T) Contains<T>(ReadOnlySpan<T>, T) Contains<T>(ReadOnlySpan<T>, T) Contains<T>(ReadOnlySpan<T>, T)

Indica se un valore specificato viene trovato in un intervallo di sola lettura.Indicates whether a specified value is found in a read-only span. 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 bool Contains(ReadOnlySpan<T> span, T value);
public static bool Contains<T> (this ReadOnlySpan<T> span, T value) where T : IEquatable<T>;
static member Contains : ReadOnlySpan<'T (requires 'T :> IEquatable<'T>)> * 'T -> bool (requires 'T :> IEquatable<'T>)
<Extension()>
Public Function Contains(Of T As IEquatable(Of T)) (span As ReadOnlySpan(Of T), value As T) As Boolean

Parametri di tipo

T

Tipo dell'intervallo.The type of the span.

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

true se il valore viene trovato; in caso contrario, false.true if found, false otherwise.

Contains<T>(Span<T>, T) Contains<T>(Span<T>, T) Contains<T>(Span<T>, T) Contains<T>(Span<T>, T)

Indica se un valore specificato viene trovato in un intervallo.Indicates whether a specified value is found in a span. 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 bool Contains(Span<T> span, T value);
public static bool Contains<T> (this Span<T> span, T value) where T : IEquatable<T>;
static member Contains : Span<'T (requires 'T :> IEquatable<'T>)> * 'T -> bool (requires 'T :> IEquatable<'T>)
<Extension()>
Public Function Contains(Of T As IEquatable(Of T)) (span As Span(Of T), value As T) As Boolean

Parametri di tipo

T

Tipo degli elementi nell'intervallo.The type of the elements in the span.

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

true se il valore viene trovato; in caso contrario, false.true if found, false otherwise.

Si applica a