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];