• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Empty NSStrings, nil NSStrings
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Empty NSStrings, nil NSStrings
      • From: Ondra Cada <email@hidden>
References: 
 >Empty NSStrings, nil NSStrings (From: Paolo Bertani <email@hidden>)
 >Re: Empty NSStrings, nil NSStrings (From: j o a r <email@hidden>)
 >Re: Empty NSStrings, nil NSStrings (From: Ondra Cada <email@hidden>)
 >Re: Empty NSStrings, nil NSStrings (From: j o a r <email@hidden>)
 >Re: Empty NSStrings, nil NSStrings (From: Ondra Cada <email@hidden>)

  • Prev by Date: Re: Empty NSStrings, nil NSStrings
  • Next by Date: Re: Empty NSStrings, nil NSStrings
  • Previous by thread: Re: Empty NSStrings, nil NSStrings
  • Next by thread: Re: Empty NSStrings, nil NSStrings
  • Index(es):
    • Date
    • Thread