I am having a little trouble figuring out a method of doing this. Basically, I have a listview that contains a bunch of poker hands. I have written a function to convert a text string into a hand. (Example: AS-2S-3S-4S-5S results in a straight flush.) I have also wrote a function to compare two hands to see which one wins. Now I need to cycle through my listview and sort the hands using my compare function. Since it is hard to reorder a listview, I thought maybe would be better to add a new column with a rank. The hand with 1 in the rank column would be the highest hand.

Right now, I'm just trying to wrap my head around the logic. Any help would be appreciated.