直接上代码
-(NSString*)twoConvertSixteen:(NSString*)string{
NSString* strTen =[NSString stringWithFormat:@"%lu", strtoul ( [stringUTF8String],0,2)];
int num = [strTen intValue];
NSString* sixTeenString = [NSString stringWithFormat:@"%x",num];
return sixTeenString;
}
南无阿弥陀佛