Note: in other questions they compare a value stored in NSData objects, not its bytes.
I want to perform something like this:
NSData *d = ...;
if (d == "fff1") {
...
}
The only solution I have found:
NSData *d = ...;
NSString *str = [NSString withFormat:@"%@", d];
if ([str isEqualToString:@"<fff1>"] {
...
}
But I don't like that I need to add extra surrounding backets in comparison. Are there better solutions?