compareTo static method
Refer to Safe.compareTo
This method has special handling for a null string or other.
If both are null then we return -1
If one of them is null then we use nullIsLessThan to determine if
we return -1 or 1.
Implementation
static int compareTo(
String? string,
String? other, {
bool nullIsLessThan = true,
}) => Safe.compareTo(string, other, nullIsLessThan: nullIsLessThan);