MemoryExtensions.ContainsAny Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
ContainsAny(Span<Char>, SearchValues<String>) |
Searches for any occurrence of any of the specified substring |
ContainsAny(ReadOnlySpan<Char>, SearchValues<String>) |
Searches for any occurrence of any of the specified substring |
ContainsAny<T>(ReadOnlySpan<T>, T, T, IEqualityComparer<T>) | |
ContainsAny<T>(Span<T>, T, T, T) |
Searches for an occurrence of |
ContainsAny<T>(ReadOnlySpan<T>, T, T, T) |
Searches for an occurrence of |
ContainsAny<T>(ReadOnlySpan<T>, T, T, T, IEqualityComparer<T>) | |
ContainsAny<T>(Span<T>, T, T) |
Searches for an occurrence of |
ContainsAny<T>(ReadOnlySpan<T>, SearchValues<T>) |
Searches for an occurrence of any of the specified |
ContainsAny<T>(ReadOnlySpan<T>, ReadOnlySpan<T>, IEqualityComparer<T>) | |
ContainsAny<T>(Span<T>, ReadOnlySpan<T>) |
Searches for an occurrence of any of the specified |
ContainsAny<T>(Span<T>, SearchValues<T>) |
Searches for an occurrence of any of the specified |
ContainsAny<T>(ReadOnlySpan<T>, ReadOnlySpan<T>) |
Searches for an occurrence of any of the specified |
ContainsAny<T>(ReadOnlySpan<T>, T, T) |
Searches for an occurrence of |
- Source:
- MemoryExtensions.cs
Searches for any occurrence of any of the specified substring values
.
public:
[System::Runtime::CompilerServices::Extension]
static bool ContainsAny(Span<char> span, System::Buffers::SearchValues<System::String ^> ^ values);
[System.Runtime.CompilerServices.OverloadResolutionPriority(-1)]
public static bool ContainsAny(this Span<char> span, System.Buffers.SearchValues<string> values);
public static bool ContainsAny(this Span<char> span, System.Buffers.SearchValues<string> values);
[<System.Runtime.CompilerServices.OverloadResolutionPriority(-1)>]
static member ContainsAny : Span<char> * System.Buffers.SearchValues<string> -> bool
static member ContainsAny : Span<char> * System.Buffers.SearchValues<string> -> bool
<Extension()>
Public Function ContainsAny (span As Span(Of Char), values As SearchValues(Of String)) As Boolean
Parameters
- values
- SearchValues<String>
The set of values to search for.
Returns
true
if found. If not found, returns false
.
- Attributes
Applies to
.NET 10 och .NET 9
Produkt | Versioner |
---|---|
.NET | 9, 10 |
- Source:
- MemoryExtensions.cs
Searches for any occurrence of any of the specified substring values
.
public:
[System::Runtime::CompilerServices::Extension]
static bool ContainsAny(ReadOnlySpan<char> span, System::Buffers::SearchValues<System::String ^> ^ values);
public static bool ContainsAny(this ReadOnlySpan<char> span, System.Buffers.SearchValues<string> values);
static member ContainsAny : ReadOnlySpan<char> * System.Buffers.SearchValues<string> -> bool
<Extension()>
Public Function ContainsAny (span As ReadOnlySpan(Of Char), values As SearchValues(Of String)) As Boolean
Parameters
- span
- ReadOnlySpan<Char>
The span to search.
- values
- SearchValues<String>
The set of values to search for.
Returns
true
if found. If not found, returns false
.
Applies to
.NET 10 och .NET 9
Produkt | Versioner |
---|---|
.NET | 9, 10 |
public static bool ContainsAny<T>(this ReadOnlySpan<T> span, T value0, T value1, System.Collections.Generic.IEqualityComparer<T>? comparer = default);
static member ContainsAny : ReadOnlySpan<'T> * 'T * 'T * System.Collections.Generic.IEqualityComparer<'T> -> bool
<Extension()>
Public Function ContainsAny(Of T) (span As ReadOnlySpan(Of T), value0 As T, value1 As T, Optional comparer As IEqualityComparer(Of T) = Nothing) As Boolean
Type Parameters
- T
Parameters
- span
- ReadOnlySpan<T>
- value0
- T
- value1
- T
- comparer
- IEqualityComparer<T>
Returns
Applies to
.NET 10
Produkt | Versioner |
---|---|
.NET | 10 |
- Source:
- MemoryExtensions.cs
- Source:
- MemoryExtensions.cs
Searches for an occurrence of value0
, value1
, or value2
, and returns true
if found. If not found, returns false
.
public:
generic <typename T>
where T : IEquatable<T>[System::Runtime::CompilerServices::Extension]
static bool ContainsAny(Span<T> span, T value0, T value1, T value2);
[System.Runtime.CompilerServices.OverloadResolutionPriority(-1)]
public static bool ContainsAny<T>(this Span<T> span, T value0, T value1, T value2) where T : IEquatable<T>;
public static bool ContainsAny<T>(this Span<T> span, T value0, T value1, T value2) where T : IEquatable<T>;
[<System.Runtime.CompilerServices.OverloadResolutionPriority(-1)>]
static member ContainsAny : Span<'T (requires 'T :> IEquatable<'T>)> * 'T * 'T * 'T -> bool (requires 'T :> IEquatable<'T>)
static member ContainsAny : Span<'T (requires 'T :> IEquatable<'T>)> * 'T * 'T * 'T -> bool (requires 'T :> IEquatable<'T>)
<Extension()>
Public Function ContainsAny(Of T As IEquatable(Of T)) (span As Span(Of T), value0 As T, value1 As T, value2 As T) As Boolean
Type Parameters
- T
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
true
if found. If not found, returns false
.
- Attributes
Applies to
.NET 10 och andra versioner
Produkt | Versioner |
---|---|
.NET | 8, 9, 10 |
- Source:
- MemoryExtensions.cs
- Source:
- MemoryExtensions.cs
Searches for an occurrence of value0
, value1
, or value2
.
public:
generic <typename T>
where T : IEquatable<T>[System::Runtime::CompilerServices::Extension]
static bool ContainsAny(ReadOnlySpan<T> span, T value0, T value1, T value2);
public static bool ContainsAny<T>(this ReadOnlySpan<T> span, T value0, T value1, T value2) where T : IEquatable<T>;
static member ContainsAny : ReadOnlySpan<'T (requires 'T :> IEquatable<'T>)> * 'T * 'T * 'T -> bool (requires 'T :> IEquatable<'T>)
<Extension()>
Public Function ContainsAny(Of T As IEquatable(Of T)) (span As ReadOnlySpan(Of T), value0 As T, value1 As T, value2 As T) As Boolean
Type Parameters
- T
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
true
if found. If not found, returns false
.
Applies to
.NET 10 och andra versioner
Produkt | Versioner |
---|---|
.NET | 8, 9, 10 |
public static bool ContainsAny<T>(this ReadOnlySpan<T> span, T value0, T value1, T value2, System.Collections.Generic.IEqualityComparer<T>? comparer = default);
static member ContainsAny : ReadOnlySpan<'T> * 'T * 'T * 'T * System.Collections.Generic.IEqualityComparer<'T> -> bool
<Extension()>
Public Function ContainsAny(Of T) (span As ReadOnlySpan(Of T), value0 As T, value1 As T, value2 As T, Optional comparer As IEqualityComparer(Of T) = Nothing) As Boolean
Type Parameters
- T
Parameters
- span
- ReadOnlySpan<T>
- value0
- T
- value1
- T
- value2
- T
- comparer
- IEqualityComparer<T>
Returns
Applies to
.NET 10
Produkt | Versioner |
---|---|
.NET | 10 |
- Source:
- MemoryExtensions.cs
- Source:
- MemoryExtensions.cs
Searches for an occurrence of value0
or value1
, and returns true
if found. If not found, returns false
.
public:
generic <typename T>
where T : IEquatable<T>[System::Runtime::CompilerServices::Extension]
static bool ContainsAny(Span<T> span, T value0, T value1);
[System.Runtime.CompilerServices.OverloadResolutionPriority(-1)]
public static bool ContainsAny<T>(this Span<T> span, T value0, T value1) where T : IEquatable<T>;
public static bool ContainsAny<T>(this Span<T> span, T value0, T value1) where T : IEquatable<T>;
[<System.Runtime.CompilerServices.OverloadResolutionPriority(-1)>]
static member ContainsAny : Span<'T (requires 'T :> IEquatable<'T>)> * 'T * 'T -> bool (requires 'T :> IEquatable<'T>)
static member ContainsAny : Span<'T (requires 'T :> IEquatable<'T>)> * 'T * 'T -> bool (requires 'T :> IEquatable<'T>)
<Extension()>
Public Function ContainsAny(Of T As IEquatable(Of T)) (span As Span(Of T), value0 As T, value1 As T) As Boolean
Type Parameters
- T
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
true
if found. If not found, returns false
.
- Attributes
Applies to
.NET 10 och andra versioner
Produkt | Versioner |
---|---|
.NET | 8, 9, 10 |
- Source:
- MemoryExtensions.cs
- Source:
- MemoryExtensions.cs
Searches for an occurrence of any of the specified values
.
public:
generic <typename T>
where T : IEquatable<T>[System::Runtime::CompilerServices::Extension]
static bool ContainsAny(ReadOnlySpan<T> span, System::Buffers::SearchValues<T> ^ values);
public static bool ContainsAny<T>(this ReadOnlySpan<T> span, System.Buffers.SearchValues<T> values) where T : IEquatable<T>;
static member ContainsAny : ReadOnlySpan<'T (requires 'T :> IEquatable<'T>)> * System.Buffers.SearchValues<'T (requires 'T :> IEquatable<'T>)> -> bool (requires 'T :> IEquatable<'T>)
<Extension()>
Public Function ContainsAny(Of T As IEquatable(Of T)) (span As ReadOnlySpan(Of T), values As SearchValues(Of T)) As Boolean
Type Parameters
- T
Parameters
- span
- ReadOnlySpan<T>
The span to search.
- values
- SearchValues<T>
The set of values to search for.
Returns
true
if found. If not found, returns false
.
Applies to
.NET 10 och andra versioner
Produkt | Versioner |
---|---|
.NET | 8, 9, 10 |
public static bool ContainsAny<T>(this ReadOnlySpan<T> span, ReadOnlySpan<T> values, System.Collections.Generic.IEqualityComparer<T>? comparer = default);
static member ContainsAny : ReadOnlySpan<'T> * ReadOnlySpan<'T> * System.Collections.Generic.IEqualityComparer<'T> -> bool
<Extension()>
Public Function ContainsAny(Of T) (span As ReadOnlySpan(Of T), values As ReadOnlySpan(Of T), Optional comparer As IEqualityComparer(Of T) = Nothing) As Boolean
Type Parameters
- T
Parameters
- span
- ReadOnlySpan<T>
- values
- ReadOnlySpan<T>
- comparer
- IEqualityComparer<T>
Returns
Applies to
.NET 10
Produkt | Versioner |
---|---|
.NET | 10 |
- Source:
- MemoryExtensions.cs
- Source:
- MemoryExtensions.cs
Searches for an occurrence of any of the specified values
and returns true
if found. If not found, returns false
.
public:
generic <typename T>
where T : IEquatable<T>[System::Runtime::CompilerServices::Extension]
static bool ContainsAny(Span<T> span, ReadOnlySpan<T> values);
[System.Runtime.CompilerServices.OverloadResolutionPriority(-1)]
public static bool ContainsAny<T>(this Span<T> span, ReadOnlySpan<T> values) where T : IEquatable<T>;
public static bool ContainsAny<T>(this Span<T> span, ReadOnlySpan<T> values) where T : IEquatable<T>;
[<System.Runtime.CompilerServices.OverloadResolutionPriority(-1)>]
static member ContainsAny : Span<'T (requires 'T :> IEquatable<'T>)> * ReadOnlySpan<'T (requires 'T :> IEquatable<'T>)> -> bool (requires 'T :> IEquatable<'T>)
static member ContainsAny : Span<'T (requires 'T :> IEquatable<'T>)> * ReadOnlySpan<'T (requires 'T :> IEquatable<'T>)> -> bool (requires 'T :> IEquatable<'T>)
<Extension()>
Public Function ContainsAny(Of T As IEquatable(Of T)) (span As Span(Of T), values As ReadOnlySpan(Of T)) As Boolean
Type Parameters
- T
Parameters
- span
- Span<T>
The span to search.
- values
- ReadOnlySpan<T>
The set of values to search for.
Returns
true
if found. If not found, returns false
.
- Attributes
Applies to
.NET 10 och andra versioner
Produkt | Versioner |
---|---|
.NET | 8, 9, 10 |
- Source:
- MemoryExtensions.cs
- Source:
- MemoryExtensions.cs
Searches for an occurrence of any of the specified values
and returns true
if found. If not found, returns false
.
public:
generic <typename T>
where T : IEquatable<T>[System::Runtime::CompilerServices::Extension]
static bool ContainsAny(Span<T> span, System::Buffers::SearchValues<T> ^ values);
[System.Runtime.CompilerServices.OverloadResolutionPriority(-1)]
public static bool ContainsAny<T>(this Span<T> span, System.Buffers.SearchValues<T> values) where T : IEquatable<T>;
public static bool ContainsAny<T>(this Span<T> span, System.Buffers.SearchValues<T> values) where T : IEquatable<T>;
[<System.Runtime.CompilerServices.OverloadResolutionPriority(-1)>]
static member ContainsAny : Span<'T (requires 'T :> IEquatable<'T>)> * System.Buffers.SearchValues<'T (requires 'T :> IEquatable<'T>)> -> bool (requires 'T :> IEquatable<'T>)
static member ContainsAny : Span<'T (requires 'T :> IEquatable<'T>)> * System.Buffers.SearchValues<'T (requires 'T :> IEquatable<'T>)> -> bool (requires 'T :> IEquatable<'T>)
<Extension()>
Public Function ContainsAny(Of T As IEquatable(Of T)) (span As Span(Of T), values As SearchValues(Of T)) As Boolean
Type Parameters
- T
Parameters
- span
- Span<T>
The span to search.
- values
- SearchValues<T>
The set of values to search for.
Returns
true
if found. If not found, returns false
.
- Attributes
Applies to
.NET 10 och andra versioner
Produkt | Versioner |
---|---|
.NET | 8, 9, 10 |
- Source:
- MemoryExtensions.cs
- Source:
- MemoryExtensions.cs
Searches for an occurrence of any of the specified values
.
public:
generic <typename T>
where T : IEquatable<T>[System::Runtime::CompilerServices::Extension]
static bool ContainsAny(ReadOnlySpan<T> span, ReadOnlySpan<T> values);
public static bool ContainsAny<T>(this ReadOnlySpan<T> span, ReadOnlySpan<T> values) where T : IEquatable<T>;
static member ContainsAny : ReadOnlySpan<'T (requires 'T :> IEquatable<'T>)> * ReadOnlySpan<'T (requires 'T :> IEquatable<'T>)> -> bool (requires 'T :> IEquatable<'T>)
<Extension()>
Public Function ContainsAny(Of T As IEquatable(Of T)) (span As ReadOnlySpan(Of T), values As ReadOnlySpan(Of T)) As Boolean
Type Parameters
- T
Parameters
- span
- ReadOnlySpan<T>
The span to search.
- values
- ReadOnlySpan<T>
The set of values to search for.
Returns
true
if found. If not found, returns false
.
Applies to
.NET 10 och andra versioner
Produkt | Versioner |
---|---|
.NET | 8, 9, 10 |
- Source:
- MemoryExtensions.cs
- Source:
- MemoryExtensions.cs
Searches for an occurrence of value0
or value1
.
public:
generic <typename T>
where T : IEquatable<T>[System::Runtime::CompilerServices::Extension]
static bool ContainsAny(ReadOnlySpan<T> span, T value0, T value1);
public static bool ContainsAny<T>(this ReadOnlySpan<T> span, T value0, T value1) where T : IEquatable<T>;
static member ContainsAny : ReadOnlySpan<'T (requires 'T :> IEquatable<'T>)> * 'T * 'T -> bool (requires 'T :> IEquatable<'T>)
<Extension()>
Public Function ContainsAny(Of T As IEquatable(Of T)) (span As ReadOnlySpan(Of T), value0 As T, value1 As T) As Boolean
Type Parameters
- T
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
true
if found. If not found, returns false
.
Applies to
.NET 10 och andra versioner
Produkt | Versioner |
---|---|
.NET | 8, 9, 10 |
Feedback om .NET
.NET är ett öppen källkod projekt. Välj en länk för att ge feedback: