aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPStringAdditions.m
diff options
context:
space:
mode:
authorstuconnolly <stuart02@gmail.com>2010-09-26 15:14:47 +0000
committerstuconnolly <stuart02@gmail.com>2010-09-26 15:14:47 +0000
commitd12ddff12e2729bb70c5dacb30927559d9c6615e (patch)
tree06d34c4f8068f42c348b2afdc133d05869b2d094 /Source/SPStringAdditions.m
parent25ef15930d0b8d4ce558ca89e721910aa2391dd8 (diff)
downloadsequelpro-d12ddff12e2729bb70c5dacb30927559d9c6615e.tar.gz
sequelpro-d12ddff12e2729bb70c5dacb30927559d9c6615e.tar.bz2
sequelpro-d12ddff12e2729bb70c5dacb30927559d9c6615e.zip
Remove 10.4 related code and associated macros.
Diffstat (limited to 'Source/SPStringAdditions.m')
-rw-r--r--Source/SPStringAdditions.m46
1 files changed, 6 insertions, 40 deletions
diff --git a/Source/SPStringAdditions.m b/Source/SPStringAdditions.m
index fc8326e7..2eafb4e9 100644
--- a/Source/SPStringAdditions.m
+++ b/Source/SPStringAdditions.m
@@ -282,41 +282,8 @@
return lineRangesArray;
}
-#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_5
-/*
- * componentsSeparatedByCharactersInSet:
- * Credit - Greg Hulands <ghulands@mac.com>
- * Needed for 10.4+ compatibility
- */
-- (NSArray *)componentsSeparatedByCharactersInSet:(NSCharacterSet *)set // 10.5 adds this to NSString, but we are 10.4+
-{
- NSMutableArray *result = [NSMutableArray array];
- NSScanner *scanner = [NSScanner scannerWithString:self];
- NSString *chunk = nil;
-
- [scanner setCharactersToBeSkipped:nil];
- BOOL sepFound = [scanner scanCharactersFromSet:set intoString:(NSString **)nil]; // skip any preceding separators
-
- if (sepFound) { // if initial separator, start with empty component
- [result addObject:@""];
- }
-
- while ([scanner scanUpToCharactersFromSet:set intoString:&chunk]) {
- [result addObject:chunk];
- sepFound = [scanner scanCharactersFromSet: set intoString: (NSString **) nil];
- }
-
- if (sepFound) { // if final separator, end with empty component
- [result addObject: @""];
- }
-
- result = [result copy];
- return [result autorelease];
-}
-#endif
-
/**
- *
+ * Returns the string by removing the characters in the supplied set and options.
*/
- (NSString *)stringByRemovingCharactersInSet:(NSCharacterSet *)charSet options:(NSUInteger)mask
{
@@ -348,7 +315,7 @@
}
/**
- *
+ * Convenience method to access the above method with no options.
*/
- (NSString *)stringByRemovingCharactersInSet:(NSCharacterSet *)charSet
{
@@ -408,16 +375,15 @@
}
/**
- * Returns the minimum of a, b and c
+ * Returns the minimum of a, b and c.
*/
- (NSInteger)smallestOf:(NSInteger)a andOf:(NSInteger)b andOf:(NSInteger)c
{
NSInteger min = a;
- if ( b < min )
- min = b;
+
+ if (b < min) min = b;
- if( c < min )
- min = c;
+ if (c < min) min = c;
return min;
}