['02', '04', '15', '22', '099', '02B', '04B', '15B', '22B', '099B'].sort(natsort());
I expected the result to be ["02", "02B", "04", "04B", "15", "15B", "22", "22B", "099", "099B"]
The actual result was ["02B", "02", "04B", "04", "15", "15B", "22", "22B", "099B", "099"]
For numbers starting with zero, the numbers with B are sorted first. I expected that the numbers followed by a letter would always be after the number by itself.
Is this a bug or is it intended to be this way?
['02', '04', '15', '22', '099', '02B', '04B', '15B', '22B', '099B'].sort(natsort());
I expected the result to be ["02", "02B", "04", "04B", "15", "15B", "22", "22B", "099", "099B"]
The actual result was ["02B", "02", "04B", "04", "15", "15B", "22", "22B", "099B", "099"]
For numbers starting with zero, the numbers with B are sorted first. I expected that the numbers followed by a letter would always be after the number by itself.
Is this a bug or is it intended to be this way?