MemoryExtensions.Equals Method

Definition

Determines whether this span and the specified other span have the same characters when compared using the specified comparisonType option.

C#
public static bool Equals(this ReadOnlySpan<char> span, ReadOnlySpan<char> other, StringComparison comparisonType);

Parameters

span
ReadOnlySpan<Char>

The source span.

other
ReadOnlySpan<Char>

The value to compare with the source span.

comparisonType
StringComparison

An enumeration value that determines how span and other are compared.

Returns

true if equal, false otherwise.

Applies to

Produkt Verzie
.NET Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Standard 2.0 (package-provided), 2.1