iOS NSLog %hd %hhd %ld and %lld format specifiers(IOS NSLog%hd%hhd%ld和%lld格式说明符)
问题描述
这些格式说明符的含义是什么?
%hd %hhd %ld %lld
推荐答案
%hd用于short integer
或unsigned short integer
%hhd用于short short integer
或unsigned short short integer
%ld用于long integer
或unsigned long integer
%lld用于long long integer
或unsigned long long integer
就这么简单。
此处h
、hh
、l
、ll
仅为%d中的长度修饰符
来源:http://developer.apple.com/library/ios/#documentation/cocoa/conceptual/Strings/Articles/formatSpecifiers.html
这篇关于IOS NSLog%hd%hhd%ld和%lld格式说明符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!