Rob*_*ens 1 iphone objective-c
NSString *x = @"12345";
NSInteger nsint = [x integerValue];
NSLog(@"%x", nsint);
Run Code Online (Sandbox Code Playgroud)
打印3039. intValue具有相同的结果.知道如何从中得到实际的十进制值吗?
NSLog(@"%d", nsint);
Run Code Online (Sandbox Code Playgroud)
%x表示十六进制格式 (有关所有格式说明符,请参阅http://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/Strings/Articles/formatSpecifiers.html#//apple_ref/doc/uid/TP40004265.)
| 归档时间: |
|
| 查看次数: |
1587 次 |
| 最近记录: |