Given an NSArray of NSStrings, is there a quick way to join them together into a single NSString (with a Separator)?
+19
A:
NSArray * stuff = /* ... */;
NSString * combinedStuff = [stuff componentsJoinedByString:@"separator"];
This is the inverse of -[NSString componentsSeparatedByString:]
.
Dave DeLong
2009-09-07 03:38:36