views:

53

answers:

1

Hi, when defining a string in Objective-C, can I do an easy assignment using a string format, such as

NSString *myVar = @"My String has %d words", 4;
+3  A: 

nope

NSString *myVar = [NSString stringWithFormat:@"My String has %d words", 4];
kubi