I have 2 strings (sOldVersion & sNewVersion) that have the form xxx.xxx.xxx (3 sections) ... for example:
1.2.3
1.10.33
2.1.15
7.80.1
These correspond to VERSIONS of one of our components (and they are retireved a strings in-code).
My problem is I need to determine if "sNewVersion" is greater, equal, or less then "sOlderVersion" ... and I can't just cast these as integers (obviouslly)...
Anyone have a clue how I could accomplish such a comparaison?
One solution I thought of (but have not yet implemented) would be to break down each version section (high, med, low), cast them as integers, and compare like that (I am sure I can get it to work, but is there a nicer way to do this?)
Any help, hints, or ideas would be greatly appreciated.
Thanks,
1.2.3
1.10.33
2.1.15
7.80.1
These correspond to VERSIONS of one of our components (and they are retireved a strings in-code).
My problem is I need to determine if "sNewVersion" is greater, equal, or less then "sOlderVersion" ... and I can't just cast these as integers (obviouslly)...
Anyone have a clue how I could accomplish such a comparaison?
One solution I thought of (but have not yet implemented) would be to break down each version section (high, med, low), cast them as integers, and compare like that (I am sure I can get it to work, but is there a nicer way to do this?)
Any help, hints, or ideas would be greatly appreciated.
Thanks,