Re: isEqualToString
Re: isEqualToString
- Subject: Re: isEqualToString
- From: Shawn Erickson <email@hidden>
- Date: Sat, 12 Jul 2003 18:09:53 -0700
On Saturday, July 12, 2003, at 05:32 PM, John MacMullin wrote:
The following NSLog output, from the code above, shows the strings to
be equal:
2003-07-12 17:25:00.865 GLASS[19889] Access to All_recordString
2003-07-12 17:25:00.865 GLASS[19889] Access To All_bundleString
2003-07-12 17:25:00.866 GLASS[19889] IsUserAll no
Again, any help would be greatly appreciated.
They are not equal because of a case difference... "to" does not equal
"To". If you want case insensitive compare use NSString's
caseInsensitiveCompare: method.
Note sending description to a string is redundant and not needed. Also
you can print an NSString (or any object) using NSLog easily by using
the %@ printf statement.
I would also move the loading of the bundle string outside of the loop
and possibly only do it once in your whole application if it is not
expected to change while running.
-Shawn
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.