not sure what is “.numeric”, probably some more so...
# android
g
not sure what is “.numeric”, probably some more sofisticated algorithm that supports such comaparsion out of the box The problem that you just cannot compare strings 9 and 11. Also, you cannot just convert string to int, because you must also sort by letter My solution is pretty simple, you just sort by int number, then by letter. You can move number split to comparator, cached value just more efficient (parse only once), but not necessary (updated sample)
s
But door number has many type like 9/A 9-A. your solution is only works with one should know every possibilities of doornumber types ?
g
you need a way how to normilize this (remove everything except letters)
Fixed, to work with digit and letter separator
I mean there is no magic, swift does something similar under the hood, maybe more sophisticated to support different cases