Name for %@ %d in an NSString

后端 未结 3 1843
遇见更好的自我
遇见更好的自我 2020-12-11 08:38

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

相关标签:
3条回答
  • 2020-12-11 09:00

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

    0 讨论(0)
  • 2020-12-11 09:10

    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

    0 讨论(0)
  • 2020-12-11 09:12

    I believe that they are called 'format placeholders', as suggested by this wikipedia article: http://en.wikipedia.org/wiki/Printf_format_string#Format_placeholders

    0 讨论(0)
提交回复
热议问题