[Sparkle] SUGetCharType for double zeroes
Dave Dribin
dave-ml at dribin.org
Mon Jul 9 09:36:01 PDT 2007
Hello,
I've noticed that SUGetCharType() returns a string type for multiple
zeroes, like "00". The current code is:
int SUGetCharType(NSString *character)
{
if ([character isEqualToString:@"."]) {
return kPeriodType;
} else if ([character isEqualToString:@"0"] || [character
intValue] != 0) {
return kNumberType;
} else {
return kStringType;
}
}
Can anyone think of a reason why not to use +[NSCharacterSet
decimalDigitCharacterSet] to match kNumberType? I'm changing my
version numbers to not use multiple zeroes, but figured this may be a
worthy patch to Sparkle to help someone else in the future.
Thanks,
-Dave
More information about the Sparkle
mailing list