aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPArrayAdditions.m
diff options
context:
space:
mode:
Diffstat (limited to 'Source/SPArrayAdditions.m')
-rw-r--r--Source/SPArrayAdditions.m10
1 files changed, 5 insertions, 5 deletions
diff --git a/Source/SPArrayAdditions.m b/Source/SPArrayAdditions.m
index e19869fa..bbc732af 100644
--- a/Source/SPArrayAdditions.m
+++ b/Source/SPArrayAdditions.m
@@ -44,15 +44,15 @@
- (NSString *)componentsJoinedByCommas
{
- NSString *result = [NSString string];
+ NSMutableString *result = [NSMutableString string];
+ [result setString:@""];
+
for (NSString *component in self)
{
if ([result length])
- {
- result = [result stringByAppendingString:@","];
- }
+ [result appendString:@","];
- result = [result stringByAppendingString:component];
+ [result appendString:component];
}
return result;
}