@umbraco-cms/backoffice
    Preparing search index...

    Function umbVariantCodeSortCompare

    • Compares two culture or segment codes, invariant (nullish) first, then ordinally and case-sensitively, matching .NET's StringComparer.Ordinal.

      Parameters

      • a: string | null | undefined

        The first code to compare.

      • b: string | null | undefined

        The second code to compare.

      Returns number

      A negative number if a sorts before b, positive if after, zero if equal.