-
Notifications
You must be signed in to change notification settings - Fork 25
Open
Description
This is more of a comment than a problem.
The algorithm in JavaScript is case-sensitive (which means output will be ["a", "c", "B"] instead of ["a", "B", "c"].
A solution within the function could be at the very beginning of declaration:
function natcompare(a, b) { a = a?.toLowerCase(); b = b?.toLowerCase(); var ia = 0, ib = 0; ...
Or you have to call natcompare with lower-case text (natcompare(a..toLowerCase(), b.toLowerCase())
Metadata
Metadata
Assignees
Labels
No labels