I\'m trying to copy an NSString
value out of an NSMutableArray
into a new variable. NSString stringWithString
is returning an NS
Since NSString
instances are not mutable, the +stringWithString:
method is simply returning the input string with an incremented reference count.
If you really want to force the creating of a new, identical string, try:
NSString * copy = [NSString stringWithFormat:@"%@", [arr objectAtIndex:0]];
There is little point in doing so, though, unless you need the pointer to be unique for some other reason...