Re: Empty NSStrings, nil NSStrings
Re: Empty NSStrings, nil NSStrings
- Subject: Re: Empty NSStrings, nil NSStrings
- From: j o a r <email@hidden>
- Date: Sun, 16 Apr 2006 20:25:19 +0200
On 16 apr 2006, at 20.13, Ondra Cada wrote:
I beg to differ. In my experience (presumed of course there is no
other place around where the same replacement would be needed!),
there is *no* more concise, cleaner and intention-revealing way of
doing this.
Why would you ever want to call "-stringByAppendingString:" on an
empty string? How about:
((nil != foo) ? [foo stringByAppendingString: bar] : bar]);
Now, we don't have to agree on this - in fact, I don't ever expect
this thread to ever end if that was the goal... In the end it comes
down to personal preference.
j o a r
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden