diff options
Diffstat (limited to 'Source/SPArrayAdditions.m')
-rw-r--r-- | Source/SPArrayAdditions.m | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/Source/SPArrayAdditions.m b/Source/SPArrayAdditions.m index bbc732af..c16616a5 100644 --- a/Source/SPArrayAdditions.m +++ b/Source/SPArrayAdditions.m @@ -33,11 +33,15 @@ */ - (NSString *)componentsJoinedAndBacktickQuoted; { - NSString *result = [NSString string]; + NSMutableString *result = [NSMutableString string]; + [result setString:@""]; + for (NSString *component in self) { - if ([result length]) result = [result stringByAppendingString: @","]; - result = [result stringByAppendingString: [component backtickQuotedString] ]; + if ([result length]) + [result appendString: @","]; + + [result appendString:[component backtickQuotedString]]; } return result; } |