greaterThanListNum<num> function
To compare Strings by code units.
Implementation
bool greaterThanListNum<num>(Iterable<num> it1, Iterable<num> it2) {
if (deepEquals(it1, it2)) {
return false;
}
List<num> l1 = List.from(it1);
List<num> l2 = List.from(it2);
for (int i = 0; i < min(it1.length, it2.length); i++) {
if (l1[i] == l2[i]) {
continue;
}
if (double.parse(l1[i].toString()) > double.parse(l2[i].toString())) {
return true;
} else {
return false;
}
}
if (l1.length > l2.length) {
return true;
}
return false;
}