diff options
author | Bibiko <bibiko@eva.mpg.de> | 2010-03-19 16:21:10 +0000 |
---|---|---|
committer | Bibiko <bibiko@eva.mpg.de> | 2010-03-19 16:21:10 +0000 |
commit | 8a7621ee68c7de9a08bbd1552c6006e4fa3aaaa9 (patch) | |
tree | 469e94974d25ebbccb1d174d2fb921e063809be9 /Source/SPArrayAdditions.m | |
parent | e1e725ef1c285f28cbbb6f4b4e8ef86b011aa34e (diff) | |
download | sequelpro-8a7621ee68c7de9a08bbd1552c6006e4fa3aaaa9.tar.gz sequelpro-8a7621ee68c7de9a08bbd1552c6006e4fa3aaaa9.tar.bz2 sequelpro-8a7621ee68c7de9a08bbd1552c6006e4fa3aaaa9.zip |
• further work on Navigator (not yet active but workable -> unHide menu item)
Diffstat (limited to 'Source/SPArrayAdditions.m')
-rw-r--r-- | Source/SPArrayAdditions.m | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/Source/SPArrayAdditions.m b/Source/SPArrayAdditions.m index de7b8a3e..6dd9aa30 100644 --- a/Source/SPArrayAdditions.m +++ b/Source/SPArrayAdditions.m @@ -76,6 +76,25 @@ return result; } +- (NSString *)componentsJoinedByPeriodAndBacktickQuotedAndIgnoreFirst +{ + NSMutableString *result = [NSMutableString string]; + [result setString:@""]; + BOOL notFirst = NO; + for (NSString *component in self) + { + if ([result length]) + [result appendString: @"."]; + + if (notFirst) + [result appendString:[component backtickQuotedString]]; + + notFirst = YES; + } + return result; +} + + - (NSArray *)subarrayWithIndexes:(NSIndexSet *)indexes { NSMutableArray *subArray = [NSMutableArray arrayWithCapacity:[indexes count]]; |