{"json_modified": "2016-03-28T07:51:35.691238", "uuid": "fbd13baa-bfe2-47fa-96ff-4bfed0e72ef4", "title": "nsIVersionComparator", "url": "/en-US/docs/Mozilla/Tech/XPCOM/Reference/Interface/nsIVersionComparator", "tags": ["XPCOM Interface Reference", "Interfaces:Scriptable", "XPCOM", "Interfaces", "XPCOM API Reference"], "translations": [], "modified": "2014-07-05T21:40:04", "label": "nsIVersionComparator", "localization_tags": [], "locale": "en-US", "id": 2397, "last_edit": "2014-07-05T21:40:02", "summary": "Version strings are dot-separated sequences of version-parts. A version-part consists of up to four parts, all of which are optional:

\n <number-a><string-b><number-c><string-d (everything else)>

\n A version-part may also consist of a single asterisk \"*\" which indicates * \"infinity\". Numbers are base-10, and are zero if left out. Strings are compared bytewise.
\n For additional backwards compatibility, if \"string-b\" is \"+\" then \"number-a\" is incremented by 1 and \"string-b\" becomes \"pre\".", "sections": [{"id": "Method_overview", "title": "Method overview"}, {"id": "Methods", "title": "Methods"}, {"id": "compare()", "title": "compare()"}, {"id": "Parameters", "title": "Parameters"}, {"id": "Return_value", "title": "Return value"}, {"id": "Example", "title": "Example"}, {"id": "Example", "title": "Example - Compare current browser version"}, {"id": "See_also", "title": "See also"}], "slug": "Mozilla/Tech/XPCOM/Reference/Interface/nsIVersionComparator", "review_tags": []}