I create an NSString using,
NSString *myString = [[NSString alloc] initWithBytes:someBuffer length:sizeof(someBuffer) encoding:NSASCIIStringEncoding];
I used NSLog to output myString and it displays “Hello”.
If this is the case, then why does this fail.
NSString *helloString = @"Hello"
BOOL check = [myString isEqualToString:helloString];
Your myString variable is actually an NSString with a length of 64; the additional characters are probably undefined. What you most likely want to do is this:
This assumes a null-terminated C-string exists in your buffer.