NSString *x = @"12345";开发者_Go百科
NSInteger nsint = [x integerValue];  
NSLog(@"%x", nsint);
Prints 3039. intValue has the same result. Any idea how I can get the actual decimal value out of that?
  NSLog(@"%d", nsint);
%x means hex format. (See http://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/Strings/Articles/formatSpecifiers.html#//apple_ref/doc/uid/TP40004265 for all format specifiers.)
NSLog(@"%d", nsint);
%x prints hex; %d prints decimal.
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论