标签:
NSString * nb = @"110000000000000000000000000000010100000000100000";
long nice = strtol([nb UTF8String], NULL, 2);
NSLog(@"nict==%ld", nice);
2. 10进制转16进制
NSString * hexString=[[NSString alloc]initWithFormat:@"%lx”,nice];
NSLog(@“%@”,hexString);
标签:
原文地址:http://www.cnblogs.com/tongyuling/p/4611111.html