Skip to content

Instantly share code, notes, and snippets.

@iandundas
Created May 20, 2013 04:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iandundas/5610461 to your computer and use it in GitHub Desktop.
Save iandundas/5610461 to your computer and use it in GitHub Desktop.
NSString format specifiers
// Format specifiers:
%@ NSString*
%d Signed Integer
%i Signed Integer
%u Unsigned Integer
%f Float / Double
%x Hexidecimal Integer
%X Hexidecimal Integer
%o Octal Integer
%zu size_t
%p Pointer
%e Float / Double (in scientific notation)
%g Float / Double (as %f or %e, based on value)
%s C String
%.*s Pascal String
%c Character
%C Unicode Character
%ll Long Long
%llu Unsigned Long Long
%Lf Long Double
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment