Convert nsstring string into char type in iOS
NSString *String = [NSString stringWithFormat:@ "5D"]; Const char *result = [string utf8string];
Char character turns into NSString
Char a["3er4"; *String = [NSString stringwithutf8string:a];
Converts a char type character to a decimal type, and then what type of input is required to convert directly
Long 0 - ); NSLog (@ "%lu", num); NSLog (@ "%0lx", num); NSLog (@ "%0lx", num);
%0x----is saved as 16 binary (lowercase letters)
%0x----is saved as 16 binary (Letters are uppercase)
Hex Add Inverse
UnsignedLongNUM1 = Strtoul ([@"5D"Utf8string],0, -); unsignedLongnum2 = Strtoul ([@"EE"Utf8string],0, -); unsignedLongnum3 = Strtoul ([@" A"Utf8string],0, -); unsignedLongNUM4 = Strtoul ([@" on"Utf8string],0, -); //binary additionByte A = num1 + num2 + num3 +num4;//Take counterByte B = ~A;//turn into hexNSString *string= [NSString stringWithFormat:@"%0x", B];
Add and reverse IOS 16 binary