iOS 16进制字符串转换成int十进制

NSRange rangeErr;

rangeErr.location = 6;

rangeErr.length = 2;

NSString *strings = [value substringWithRange:rangeErr];

int errCode = (int)strtoul([strings UTF8String],0,16);  //16进制字符串转换成int

NSString *ascStr = [NSString stringWithFormat:@"%c",red];

上一篇:C++实现16进制字符串转换成int整形值


下一篇:CSS的背景属性和边框属性