NSMutableString *, , , NSString *, . : NSMutableString .
NSMutableString *selectDay = [NSMutableString stringWithString:@"Wed 14 May"];
[selectDay appendFormat:@"%i", yearNumber];
NSLog(@"%@", selectDay);
, .
NSString *selectDay = @"Wed 14 May";
NSString *newDay = [selectDay stringByAppendingFormat:@"%i", yearNumber];
NSLog(@"%@", newDay);
The point here is that it stringByAppendingFormat:does not change the original string, it returns a new one. And you just need to "catch" it in a variable.
source
share