MemoryExtensions.Contains 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.
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
Parameters
- span
- ReadOnlySpan<Char>
The source span.
- value
- ReadOnlySpan<Char>
The value to seek within the source span.
- comparisonType
- StringComparison
An enumeration value that determines how the characters in span and value are compared.
Returns
true if value occurs within the span, false otherwise.