Why don't you just use the features of NSString ?

stringByReplacingPercentEscapesUsingEncoding:

http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/Reference/NSString.html#/ /apple_ref/doc/uid/20000154-BCIECHFE

On Apr 5, 2009, at 3:56 PM, Stuart Malin wrote:

I need to convert strings that contain HTML entities (e.g., ’ 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?
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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/intrntmn%40aol.com

This email sent to intrn...@aol.com

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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 arch...@mail-archive.com

Reply via email to