I cant seem to think this morning...
I am trying to compare version strings. These are scraped off a website...
examples:
4.5.0.55
4.2.2.128
4.5.0.37
5.0.0.713
how do i make sure I am grabbing the highest version?
right now I have it checking the length, if less than 9 .. add a zero. then remove the .'s and convert to an integer. then just check. I know thats not the best and most accurate. Thats why Im asking LOL
help my tired brain....
THANKS!
edit:
yep just spotted a problem
if the one is 4.5.0.55 and i compare to 4.5.0.128 it thinks the 55 is newer because it added the 0!
sigh... help!




Reply With Quote