Development · Native API migration preview · Coverage validation in progress Published release →

API Browser

Method

CompareOrdinal

static func CompareOrdinal(left: string, right: string) -> int

Declaring type: String
Module: System
Assembly: System.Runtime.dll
Source file: String.rvn

Compares text in UTF-8 byte order.

Parameters

Name Type Description
left String First text.
right String Second text.

Return value

Int32

A negative integer, zero or a positive integer for less than, equal or greater than.

Remarks

For valid UTF-8 this agrees with Unicode scalar order; it can differ from .NET UTF-16 ordinal ordering for supplementary characters. No normalization or culture rules.