Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Name for %@ %d in an NSString

What are these called in Objective C? @"%@" @"%d" @"%i"

like image 475
gadgetmo Avatar asked Dec 10 '22 05:12

gadgetmo


2 Answers

They are called format specifiers, could also be called 'placeholders in a string for the variables that will follow'.

https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/Strings/Articles/formatSpecifiers.html

like image 118
0x8badf00d Avatar answered Dec 11 '22 17:12

0x8badf00d


They are NSString literals. More specifically, they look they are being used as formatting strings for printf style functions.

like image 34
IronMensan Avatar answered Dec 11 '22 17:12

IronMensan