Re: NSXML and invalid UTF8 characters
Re: NSXML and invalid UTF8 characters
- Subject: Re: NSXML and invalid UTF8 characters
- From: Jens Alfke <email@hidden>
- Date: Thu, 28 Jan 2010 19:28:54 -0800
On Jan 28, 2010, at 4:29 PM, Keith Blount wrote:
> [cleanedString appendFormat:@"%C", character];
If you're worried about efficiency, format conversions like this are particularly slow; so is building up an NSString a character at a time. It's more efficient to allocate a unichar[] buffer with sufficient capacity, put characters in it, and then create an NSString in one operation.
It's probably not a big deal, though, unless you're running this on extremely long strings or on huge numbers of them.
—Jens_______________________________________________
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