Code sample:
NSString *title = [[NSString alloc]initWithFormat: @"%@", [self.answers valueForKey:idVor]];
NSString *message = [[NSString alloc]initWithFormat: @"%@",nameVor];
NSLog(@"%@", title);
NSLog(@"%@", message);
if([title isEqualToString:message])
NSLog(@"equal");
The vars title and message never respond to the if statement even though they contain the same string.
I ran NSLogs for these to see what was contained in each string var.
I got the following output:
f[Session started at 2009-09-21 17:27:56 -0500.]
2009-09-21 17:28:00.256 pickerReview[2394:20b] (
Amedee
)
2009-09-21 17:28:00.257 pickerReview[2394:20b] Amedee
I guess it's not equal because the NSString title var has parentheses around it... Is there a way to format this so that it satisfies the expression in the if statement?