Since letters with different cases, and numbers (digits) all have ascii (character set) values, they are already being sorted.

No changes needed.

Digits have a lower value than anything letter, uppercase letters have a lower value than any lowercase letter. If you want to have the case or the letter ignored, then you'll need to change the code.