Are there any shortcuts to (stringByAppendingString:
) string concatenation in Objective-C, or shortcuts for working with NSString
in general?
Two answers I can think of... neither is particularly as pleasant as just having a concatenation operator.
First, use an NSMutableString
, which has an appendString
method, removing some of the need for extra temp strings.
Second, use an NSArray
to concatenate via the componentsJoinedByString
method.