Re: is Shane's advice being collated?
Re: is Shane's advice being collated?
- Subject: Re: is Shane's advice being collated?
- From: 2551 <email@hidden>
- Date: Thu, 20 Nov 2014 12:53:19 +0700
> On 20 Nov 2014, at 09:51, Shane Stanley <email@hidden> wrote:
>
> So for lurkers, the difference is something like:
>
> if x = y then
>
> vs:
>
> if (x's isEqualToString:y) as boolean
>
> Less typing, but I don't know that it's significantly "easier".
When doing comparisons of hard-coded strings against strings returned from methods, AppleScript's "=" handles any null-termination for you automatically, ignoring the terminating character, whereas isEqualToString: doesn't.
That means if you're comparing two strings in Cocoa and you don't know whether one, both or neither might be null-terminated, you have to write extra code to account for that.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden