OrderedId64Iterable.compare Function
An ordered comparison of Id64Strings suitable for use with sorting routines like
Array.sort and sorted containers like SortedArray and Dictionary. The comparison compares the 64-bit numerical values of the two Ids, returning a negative number if lhs < rhs, a positive number if lhs > rhs, or zero if lhs == rhs. The default string comparison is fine (and more efficient) when numerical ordering is not required; use this instead if you want e.g., "0x100" to be greater than "0xf".
compare(lhs: string, rhs: string): number
see OrderedId64Iterable.sortArray for a convenient way to sort an array of Id64Strings.
Parameter | Type | Description |
---|---|---|
lhs | string | |
rhs | string |
Returns - number
Defined in
Last Updated: 20 June, 2023