CompareTo()

System::MemoryExtensions::CompareTo(const ReadOnlySpan<char16_t>&, const ReadOnlySpan<char16_t>&, StringComparison) function

Compares two character spans with specified string comparison rules.

int32_t System::MemoryExtensions::CompareTo(const ReadOnlySpan<char16_t> &span, const ReadOnlySpan<char16_t> &other, StringComparison comparisonType)

Arguments

ParameterTypeDescription
spanconst ReadOnlySpan<char16_t>&The first character span
otherconst ReadOnlySpan<char16_t>&The second character span
comparisonTypeStringComparisonThe type of string comparison to perform

Return Value

Negative value if span < other, zero if equal, positive if span > other

See Also