【IOS基础知识】格式输出

来源:互联网 发布:ubuntu 桌面假死 编辑:程序博客网 时间:2024/06/08 04:20
%@ Object
%d, %i signed int
%u unsigned int
%f float/double
%x, %X hexadecimal int
%o octal int
%zu size_t
%p pointer
%e float/double (in scientific notation)
%g float/double (as %f or %e, depending on value)
%s C string (bytes)
%S C string (unichar)
%.*s Pascal string (requires two arguments, pass pstr[0] as the first, pstr+1 as the second)
%c character
%C unichar
%lld long long (lli -> long long int)
%llu unsigned long long
%Lf long double
0 0