natorder
natorder copied to clipboard
Small example that acts weird
Hi
This example doesn't come out as expected: Unsorted: "B4S B", "B4A B", "B4 B" Sorted: "B4A B", "B4 B", "B4S B" Expected: "B4 B", "B4A B", "B4S B"
I'm guessing it compares A in "B4A B" to B in "B4 B".
#12 ?
I guess they could be solved as one ticket, but ignoring whitespace between digits only would fail in this example. It would have to ignore whitespace between word-digit and digit-digit, but not digit-word or word-word. So in the case above it would have to compare: [B, 4, ' ', B] to [B, 4, A, ' ', B]
It would be best to have the ignoring configurable for all those cases.