MemoryExtensions.ContainsAny 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
ContainsAny(ReadOnlySpan<Char>, SearchValues<String>) |
搜尋任何出現的指定子字串 |
ContainsAny(Span<Char>, SearchValues<String>) |
搜尋任何出現的指定子字串 |
ContainsAny<T>(ReadOnlySpan<T>, T, T, T) |
搜尋出現 |
ContainsAny<T>(Span<T>, T, T) |
搜尋出現 |
ContainsAny<T>(ReadOnlySpan<T>, T, T) |
搜尋出現 |
ContainsAny<T>(ReadOnlySpan<T>, SearchValues<T>) |
搜尋任何指定的 |
ContainsAny<T>(Span<T>, SearchValues<T>) |
搜尋任何指定的 |
ContainsAny<T>(ReadOnlySpan<T>, ReadOnlySpan<T>) |
搜尋任何指定的 |
ContainsAny<T>(Span<T>, T, T, T) |
搜尋 |
ContainsAny<T>(Span<T>, ReadOnlySpan<T>) |
搜尋任何指定的 |
ContainsAny(ReadOnlySpan<Char>, SearchValues<String>)
搜尋任何出現的指定子字串 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
參數
- span
- ReadOnlySpan<Char>
要搜尋的範圍。
- values
- SearchValues<String>
要搜尋的值集。
傳回
找到時 true
。 如果找不到,則會傳回 false
。
適用於
ContainsAny(Span<Char>, SearchValues<String>)
搜尋任何出現的指定子字串 values
。
public:
[System::Runtime::CompilerServices::Extension]
static bool ContainsAny(Span<char> span, System::Buffers::SearchValues<System::String ^> ^ values);
public static bool ContainsAny (this Span<char> span, System.Buffers.SearchValues<string> values);
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
參數
- values
- SearchValues<String>
要搜尋的值集。
傳回
找到時 true
。 如果找不到,則會傳回 false
。
適用於
ContainsAny<T>(ReadOnlySpan<T>, T, T, T)
搜尋出現 value0
、value1
或 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
類型參數
- T
參數
- span
- ReadOnlySpan<T>
要搜尋的範圍。
- value0
- T
要搜尋的其中一個值。
- value1
- T
要搜尋的其中一個值。
- value2
- T
要搜尋的其中一個值。
傳回
找到時 true
。 如果找不到,則會傳回 false
。
適用於
ContainsAny<T>(Span<T>, T, T)
搜尋出現 value0
或 value1
,如果找到,則會傳回 true
。 如果找不到,則會傳回 false
。
public:
generic <typename T>
where T : IEquatable<T>[System::Runtime::CompilerServices::Extension]
static bool ContainsAny(Span<T> span, T value0, T value1);
public static bool ContainsAny<T> (this Span<T> span, T value0, T value1) where 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
類型參數
- T
參數
- span
- Span<T>
要搜尋的範圍。
- value0
- T
要搜尋的其中一個值。
- value1
- T
要搜尋的其中一個值。
傳回
找到時 true
。 如果找不到,則會傳回 false
。
適用於
ContainsAny<T>(ReadOnlySpan<T>, T, T)
搜尋出現 value0
或 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
類型參數
- T
參數
- span
- ReadOnlySpan<T>
要搜尋的範圍。
- value0
- T
要搜尋的其中一個值。
- value1
- T
要搜尋的其中一個值。
傳回
找到時 true
。 如果找不到,則會傳回 false
。
適用於
ContainsAny<T>(ReadOnlySpan<T>, SearchValues<T>)
搜尋任何指定的 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
類型參數
- T
參數
- span
- ReadOnlySpan<T>
要搜尋的範圍。
- values
- SearchValues<T>
要搜尋的值集。
傳回
找到時 true
。 如果找不到,則會傳回 false
。
適用於
ContainsAny<T>(Span<T>, SearchValues<T>)
搜尋任何指定的 values
,並在找到時傳回 true
。 如果找不到,則會傳回 false
。
public:
generic <typename T>
where T : IEquatable<T>[System::Runtime::CompilerServices::Extension]
static bool ContainsAny(Span<T> span, System::Buffers::SearchValues<T> ^ values);
public static bool ContainsAny<T> (this Span<T> span, System.Buffers.SearchValues<T> values) where 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
類型參數
- T
參數
- span
- Span<T>
要搜尋的範圍。
- values
- SearchValues<T>
要搜尋的值集。
傳回
找到時 true
。 如果找不到,則會傳回 false
。
適用於
ContainsAny<T>(ReadOnlySpan<T>, ReadOnlySpan<T>)
搜尋任何指定的 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
類型參數
- T
參數
- span
- ReadOnlySpan<T>
要搜尋的範圍。
- values
- ReadOnlySpan<T>
要搜尋的值集。
傳回
找到時 true
。 如果找不到,則會傳回 false
。
適用於
ContainsAny<T>(Span<T>, T, T, T)
搜尋 value0
、value1
或 value2
,如果找到,則會傳回 true
。 如果找不到,則會傳回 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);
public static bool ContainsAny<T> (this Span<T> span, T value0, T value1, T value2) where 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
類型參數
- T
參數
- span
- Span<T>
要搜尋的範圍。
- value0
- T
要搜尋的其中一個值。
- value1
- T
要搜尋的其中一個值。
- value2
- T
要搜尋的其中一個值。
傳回
找到時 true
。 如果找不到,則會傳回 false
。
適用於
ContainsAny<T>(Span<T>, ReadOnlySpan<T>)
搜尋任何指定的 values
,並在找到時傳回 true
。 如果找不到,則會傳回 false
。
public:
generic <typename T>
where T : IEquatable<T>[System::Runtime::CompilerServices::Extension]
static bool ContainsAny(Span<T> span, ReadOnlySpan<T> values);
public static bool ContainsAny<T> (this Span<T> span, ReadOnlySpan<T> values) where 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
類型參數
- T
參數
- span
- Span<T>
要搜尋的範圍。
- values
- ReadOnlySpan<T>
要搜尋的值集。
傳回
找到時 true
。 如果找不到,則會傳回 false
。