美文网首页
iOS打印输出类型全集

iOS打印输出类型全集

作者: WorldPeace_hp | 来源:发表于2017-11-13 18:20 被阅读0次
Objective-c
NSLog(@"print message %ld !",(long)i);
C
printf("print message %ld !", (long)i);
输出类型:
%@ 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
%llu unsigned long long
%Lf long double

点击:参考官网

相关文章

网友评论

      本文标题:iOS打印输出类型全集

      本文链接:https://www.haomeiwen.com/subject/dswzmxtx.html