aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPArrayAdditions.m
diff options
context:
space:
mode:
Diffstat (limited to 'Source/SPArrayAdditions.m')
-rw-r--r--Source/SPArrayAdditions.m15
1 files changed, 15 insertions, 0 deletions
diff --git a/Source/SPArrayAdditions.m b/Source/SPArrayAdditions.m
index 853421e0..37b1ba62 100644
--- a/Source/SPArrayAdditions.m
+++ b/Source/SPArrayAdditions.m
@@ -42,6 +42,21 @@
return result;
}
+- (NSString *)componentsJoinedByCommas
+{
+ NSString *result = [NSString string];
+ for (NSString *component in self)
+ {
+ if ([result length])
+ {
+ result = [result stringByAppendingString:@","];
+ }
+
+ result = [result stringByAppendingString:component];
+ }
+ return result;
+}
+
- (NSArray *)subarrayWithIndexes:(NSIndexSet *)indexes
{
NSMutableArray *subArray = [NSMutableArray arrayWithCapacity:[indexes count]];