View Single Post
11-21-14, 07:16 AM   #9
Digital_Utopia
A Flamescale Wyrmkin
 
Digital_Utopia's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2012
Posts: 110
Originally Posted by Seerah View Post
Also, what if author A uses this versioning scheme:
  • 1.8
  • 1.9
  • 1.10
  • 1.11
But author B uses this:
  • 1.08
  • 1.09
  • 1.10
  • 1.11
That shouldn't be a problem - the tricky part would be handling letters, such as 1.03a or 0.2(beta), etc.
if it was just numbers, then simply removing any decimal points after the first one, casting them as floats and comparing would be easy enough. You could even probably do some minor regex and at least check for any letters immediately following the numbers, cast them to a char, and compare the values.

I would imagine that would handle the vast majority of addons.
__________________
  Reply With Quote