For those newbies having trouble figuring out what isEqualToString is doing, I did this to solve my problem.
(1) Check to see if the two strings are CFEqual.
(2) In both cases, parse the string character by character. In my case, the two strings were not of equal length which did not make sense from the debugger to me. After parsing the savedFirstNotice string, for whatever reason, the app was adding one blank space before the string and two blank spaces after the string. So far, it appears to be a consistent action so it is easy for me to eliminate it from all my variables that I use in the method.
Thanks everybody for your suggestions - ones that work and do not work for it gives me ideas or thoughts to think about.
Here is the code that found my problem:
if (CFEqual (savedFirstNotice , mother ))
{ NSLog (@" Both savedFirstNotice and mother are Equal") ; }
else
{ NSLog ( @" savedFirstNotice and mother are NOT Equal ") ;
NSLog ( @" The length of savedFirstNotice is %d", savedFirstNotice.length );
NSLog ( @" The length of mother is %d", mother.length );
NSLog ( @" savedFirstNotice character 0 %c ",[ savedFirstNotice characterAtIndex: 0 ]);
NSLog ( @" savedFirstNotice character 1 %c ",[ savedFirstNotice characterAtIndex: 1 ]);
// duplicate to capture the entire string
}
Also, I recommend that one reads the Apple documentation on CFEqual and related items.