I want to write a cmp-like function which compares two version numbers and returns -1, 0, or 1 based on their compared va
cmp
-1
0
1
i'm using this one on my project:
cmp(v1.split("."), v2.split(".")) >= 0