• 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: NSString newbie question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSString newbie question


  • Subject: Re: NSString newbie question
  • From: Paul Lynch <email@hidden>
  • Date: Wed, 15 Mar 2006 16:25:13 +0000


On 15 Mar 2006, at 16:18, Mitchell Hashimoto wrote:

NSString *myStr = [[[[NSString alloc] initWithString:@"Rating: ("]
stringByAppendingString:[ratingOutlet stringValue]]
stringByAppendingString:@"/10"];

Only if you promise to remember to [myStr autorelease];

Also, is there any way to override the "+" operator in Objective C?
That could make concatenating strings much easier.

No. But stringWithFormat: makes it unnecessary.

Paul
_______________________________________________
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


References: 
 >NSString newbie question (From: "Bobby B" <email@hidden>)
 >Re: NSString newbie question (From: "Mitchell Hashimoto" <email@hidden>)

  • Prev by Date: Re: dockable windows
  • Next by Date: Disabling the Table Panel
  • Previous by thread: Re: NSString newbie question
  • Next by thread: Re: NSString newbie question
  • Index(es):
    • Date
    • Thread