2 // SUStandardVersionComparator.h
5 // Created by Andy Matuschak on 12/21/07.
6 // Copyright 2007 Andy Matuschak. All rights reserved.
9 #ifndef SUSTANDARDVERSIONCOMPARATOR_H
10 #define SUSTANDARDVERSIONCOMPARATOR_H
12 #if __has_feature(modules)
15 #import <Foundation/Foundation.h>
18 #import "SUVersionComparisonProtocol.h"
20 NS_ASSUME_NONNULL_BEGIN
23 Sparkle's default version comparator.
25 This comparator is adapted from MacPAD, by Kevin Ballard.
26 It's "dumb" in that it does essentially string comparison,
27 in components split by character type.
29 SU_EXPORT @interface SUStandardVersionComparator
: NSObject
<SUVersionComparison
>
32 Initializes a new instance of the standard version comparator.
37 Returns a singleton instance of the comparator.
39 It is usually preferred to alloc/init new a comparator instead.
41 + (SUStandardVersionComparator
*)defaultComparator
;
44 Compares version strings through textual analysis.
46 See the implementation for more details.
48 - (NSComparisonResult
)compareVersion
:(NSString
*)versionA toVersion
:(NSString
*)versionB
;