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

定義

オーバーロード

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

指定された値が読み取り専用の文字スパン内にあるかどうかを示します。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)

指定した値が読み取り専用スパンに存在するかどうかを示します。Indicates whether a specified value is found in a read-only span. 値は 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)

指定した値がスパンに存在するかどうかを示します。Indicates whether a specified value is found in a span. 値は 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)

指定された値が読み取り専用の文字スパン内にあるかどうかを示します。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

パラメーター

span
ReadOnlySpan<Char>

ソース スパン。The source span.

value
ReadOnlySpan<Char>

ソース スパン内でシークする値。The value to seek within the source span.

comparisonType
StringComparison StringComparison StringComparison StringComparison

spanvalue 内の文字の比較方法を決定する列挙型の値。An enumeration value that determines how the characters in span and value are compared.

戻り値

value がスパン内にある場合は true。ない場合は falsetrue 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)

指定した値が読み取り専用スパンに存在するかどうかを示します。Indicates whether a specified value is found in a read-only span. 値は 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

型パラメーター

T

スパンの種類。The type of the span.

パラメーター

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

検索するスパン。The span to search.

value

検索する値。The value to search for.

戻り値

見つかった場合は true。それ以外の場合は falsetrue if found, false otherwise.

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

指定した値がスパンに存在するかどうかを示します。Indicates whether a specified value is found in a span. 値は 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

型パラメーター

T

スパン内の要素の型。The type of the elements in the span.

パラメーター

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

検索するスパン。The span to search.

value

検索する値。The value to search for.

戻り値

見つかった場合は true。それ以外の場合は falsetrue if found, false otherwise.

適用対象