I have an ArrayList of video resolutions that looks like this:
"1024x768", "800x600", "1280x1024", etc
I want to sort it based on numeric value in first part of string. Ie, the above would sort out to look like this:
"800x600","1024x768","1280x1024"
Is there a quick and dirty way to do this, by that I mean in less then 2-3 lines of code? If not, what would be the proper way? The values I get are from an object not my own. It does have a getWidth() and getHeight() methods that return ints.