• 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: NSMutableString appendString: "appending self" allowed?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSMutableString appendString: "appending self" allowed?


  • Subject: Re: NSMutableString appendString: "appending self" allowed?
  • From: Manfred Schwind <email@hidden>
  • Date: Thu, 30 Aug 2007 15:08:23 +0200

Have a look at the source code. It's open source.

Hmm, ok, you mean in CFString.c of Darwin? Can I be sure that e.g. the appendString method of a Cocoa NSString is directly mapping to the equivalent CFString function (CFStringAppend in this case)?


To answer my own question (and if CFStringAppend is used):

For the special case of appending a string to itself there is special handling at least in the sources for 10.4.10. But I also looked into the sources for 10.3.9 and there this special handling is missing. The special handling just creates a temporary copy of the string.

So I'd better do my own copy, to be on the safe side.

Mani

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >NSMutableString appendString: "appending self" allowed? (From: Manfred Schwind <email@hidden>)
 >Re: NSMutableString appendString: "appending self" allowed? (From: Chris Suter <email@hidden>)

  • Prev by Date: Re: How to prevent NSApp from NSBeeping ?
  • Next by Date: Re: Color matching of NSBitmapImageRep
  • Previous by thread: Re: NSMutableString appendString: "appending self" allowed?
  • Next by thread: Re: NSMutableString appendString: "appending self" allowed?
  • Index(es):
    • Date
    • Thread