Can I make a simple init format string using @ "

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

NSString *myVar = @"My String has %d words", 4; 
+4
source share
1 answer

No

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

Source: https://habr.com/ru/post/1303120/


All Articles