Skip to content

Instantly share code, notes, and snippets.

@elizaaverywilson
Created November 23, 2013 19:27
Show Gist options
  • Save elizaaverywilson/7618826 to your computer and use it in GitHub Desktop.
Save elizaaverywilson/7618826 to your computer and use it in GitHub Desktop.
NSLog Token Cheat Sheet
// NSLog Tokens
// ----------------------------------------------------
// Symbol .........|...Displays
// %@ .............|...id
// %d,%D,%i .......|...long
// %u,%U ..........|...unsigned long
// %hi ............|...short
// %hu ............|...unsigned short
// %qi ............|...long long
// %qu ............|...unsigned long long
// %x,%X ..........|...unsigned long printed as hexidecimal
// %p .............|...void * (an address printed in hexidecimal with a leading 0x)
// %o,%O ..........|...unsigned long printed as octal
// %f,%e,%E,%g,%G .|...double
// %c .............|...unsigned char as ASCII character
// %s .............|...char * (a null-terminated C string of ASCII characters)
// %S .............|...unichar * (a null-terminated C string of Unicode characters)
// %% .............|...A%character
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment