Format String Tokens
There are several methods in Cocoa, such as NSLog and [NSString stringWithFormat], that can use format strings with a list of arguments. These format strings can contain all of the normal printf-style tokens, as well as a Cocoa-specific token for objects.
%@ Print as an object
%d or %i signed decimal
%o unsigned octal
%s string
%u unsigned decimal
%x unsigned hexadecimal
For other information open a Terminal window and enter "man printf" at the prompt.
There are several methods in Cocoa, such as NSLog and [NSString stringWithFormat], that can use format strings with a list of arguments. These format strings can contain all of the normal printf-style tokens, as well as a Cocoa-specific token for objects.
%@ Print as an object
%d or %i signed decimal
%o unsigned octal
%s string
%u unsigned decimal
%x unsigned hexadecimal
For other information open a Terminal window and enter "man printf" at the prompt.
No comments:
Post a Comment