Created
February 2, 2012 07:25
-
-
Save wjlafrance/1722168 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Java sorts numbers before letters, so if one is a letter and one is a number, | |
// flip their sort ordering | |
if (Character.isDigit(ourName.charAt(0)) ^ Character.isDigit(theirName.charAt(0))) | |
return ourName.compareTo(theirName) * -1; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment