NSString accessing characters
NSString accessing characters
- Subject: NSString accessing characters
- From: Andreas Grosam <email@hidden>
- Date: Fri, 17 Jun 2011 09:46:14 +0200
Hi All,
I've written a parser which can natively parse any Unicode encoding form (UTF-8, UTF16 BE/LE, UTF-32 BE/LE). It takes iterators as input parameters, that is (const) pointers to uint8_t, uint16t and uint32_t which are selected according the Unicode encoding form of the given input text.
So, the interface looks basically as followed (global free function):
id parse(Iterator first, Iterator last);
where 'Iterator' is one of the mentioned iterator types above, and 'first' is the beginning of the text, and 'last' is an iterator representing the end of the text.
Given an NSString as input source, what is the fastest method to "feed" the parser?
Also worth mentioning is the possible fact about hidden autoreleased memory objects, for instance when retrieving c-strings from the NSString object or when converting the NSString's internal encoding to some specified external form.
Thanks for tips,
Andreas
_______________________________________________
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