On Sun, Apr 5, 2009 at 2:56 PM, Stuart Malin <[email protected]> wrote:
> I need to convert strings that contain HTML entities (e.g., &#8217;  or
> &#gt;).  I can't seem to find an NSString method to do so (not that I
> sometimes don't easily miss the obvious).  So, I created a category on
> NSString and made two trivial methods that take advantage of toll-free
> bridging between NSString and CFStringRef by using
> CFXMLCreateStringByEscapingEntities and
> CFXMLCreateStringByUnescapingEntities.  Is there a better way?

Sounds good. Are you using garbage collection? You should read this if
you haven't already. It explains how CF(Retain|Release) work under GC
and when to use CFMakeCollectable:

<http://developer.apple.com/documentation/Cocoa/Conceptual/GarbageCollection/Articles/gcCoreFoundation.html#//apple_ref/doc/uid/TP40006687>
_______________________________________________

Cocoa-dev mailing list ([email protected])

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to