参考: https://twitter.com/gparker/status/377910611453046784
%zd, %tu, %tx (signed, unsigned, hex) currently format NSInteger and NSUInteger with
no warnings.
也就是说:
NSInteger 用 %zd
NSUInteger 用 %tu
16进制格式 用 %tx
本文介绍了如何使用不同的格式化字符串来正确地显示NSInteger和NSUInteger类型的数值。对于NSInteger使用%zd,对于NSUInteger使用%tu,而对于十六进制的格式化则采用%tx。
参考: https://twitter.com/gparker/status/377910611453046784
%zd, %tu, %tx (signed, unsigned, hex) currently format NSInteger and NSUInteger with
no warnings.
也就是说:
NSInteger 用 %zd
NSUInteger 用 %tu
16进制格式 用 %tx

被折叠的 条评论
为什么被折叠?