MemoryExtensions.ContainsAny Method
Definition
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.
Overloads
| 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>) |
Searches for an occurrence of either of the specified values. |
| 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>) |
Searches for any occurrence of the specified values in the specified span. |
| 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>) |
Searches for any occurrence of any of the specified |
| 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 |
ContainsAny(Span<Char>, SearchValues<String>)
- Source:
- MemoryExtensions.cs
- 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
ContainsAny(ReadOnlySpan<Char>, SearchValues<String>)
- Source:
- MemoryExtensions.cs
- 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
ContainsAny<T>(ReadOnlySpan<T>, T, T, IEqualityComparer<T>)
- Source:
- MemoryExtensions.cs
Searches for an occurrence of either of the specified values.
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>
The span to search.
- value0
- T
The first value to search for.
- value1
- T
The second value to search for.
- comparer
- IEqualityComparer<T>
The IEqualityComparer<T> implementation to use when comparing elements, or null to use the default IEqualityComparer<T> for the type of an element.
Returns
true if an occurrence of either value is found; otherwise false.
Applies to
ContainsAny<T>(Span<T>, T, T, T)
- Source:
- MemoryExtensions.cs
- Source:
- MemoryExtensions.cs
- Source:
- MemoryExtensions.cs
Searches for an occurrence of value0, value1, or value2 in the specified span.
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
The first value to search for.
- value1
- T
The second value to search for.
- value2
- T
The third value to search for.
Returns
true if any of the values is found; otherwise, false.
- Attributes
Applies to
ContainsAny<T>(ReadOnlySpan<T>, T, T, T)
- Source:
- MemoryExtensions.cs
- Source:
- MemoryExtensions.cs
- Source:
- MemoryExtensions.cs
Searches for an occurrence of value0, value1, or value2 in the specified span.
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
The first value to search for.
- value1
- T
The second value to search for.
- value2
- T
The third value to search for.
Returns
true if any of the values is found; otherwise, false.
Applies to
ContainsAny<T>(ReadOnlySpan<T>, T, T, T, IEqualityComparer<T>)
- Source:
- MemoryExtensions.cs
Searches for any occurrence of the specified values in the specified span.
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>
The span to search.
- value0
- T
The first value to search for.
- value1
- T
The second value to search for.
- value2
- T
The third value to search for.
- comparer
- IEqualityComparer<T>
The IEqualityComparer<T> implementation to use when comparing elements, or null to use the default IEqualityComparer<T> for the type of an element.
Returns
true if any of the values is found; otherwise, false
Applies to
ContainsAny<T>(Span<T>, T, T)
- Source:
- MemoryExtensions.cs
- 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
The first value to search for.
- value1
- T
The second value to search for.
Returns
true if found. If not found, returns false.
- Attributes
Applies to
ContainsAny<T>(ReadOnlySpan<T>, SearchValues<T>)
- Source:
- MemoryExtensions.cs
- 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
ContainsAny<T>(ReadOnlySpan<T>, ReadOnlySpan<T>, IEqualityComparer<T>)
- Source:
- MemoryExtensions.cs
Searches for any occurrence of any of the specified values and returns true if found. If not found, returns false.
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>
The span to search.
- values
- ReadOnlySpan<T>
The set of values to search for.
- comparer
- IEqualityComparer<T>
The comparer to use. If null, Default is used.
Returns
Applies to
ContainsAny<T>(Span<T>, ReadOnlySpan<T>)
- Source:
- MemoryExtensions.cs
- 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
ContainsAny<T>(Span<T>, SearchValues<T>)
- Source:
- MemoryExtensions.cs
- 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
ContainsAny<T>(ReadOnlySpan<T>, ReadOnlySpan<T>)
- Source:
- MemoryExtensions.cs
- 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
ContainsAny<T>(ReadOnlySpan<T>, T, T)
- Source:
- MemoryExtensions.cs
- 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
The first value to search for.
- value1
- T
The second value to search for.
Returns
true if found. If not found, returns false.