IOS How to convert HexString from String

+ (NSString *) hexToString:(NSString *)string {
    const char *utf8 = [string UTF8String];
    NSMutableString *hex = [NSMutableString string];
    while ( *utf8 ) [hex appendFormat:@"%02X" , *utf8++ & 0x00FF];
   
    return [NSString stringWithFormat:@"%@", hex];

}

Comments

Popular posts from this blog

Java : Variables Declaring

SQL Self JOIN