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

LINUX Move and copy files using SSH

PHP Predefined Variables

Java : Variables Declaring