NSMutableString *str, *str1;
//allocation here
i am using
[str appendString:str1] is not working.
[str appendFormat:str
if str == nil, no call are performed because there is no object allocated to receive the message but no exception are raised (messages sent to nil return nil by design in Objective-C).
NSMutableString *str, *str1;
str = [NSMutableString stringWithString:@"Hello "];
str1 = [NSMutableString stringWithString:@"World"];
NSMutableString *sayit = [str appendString:str1];