On 07/10/2009, at 11:00 PM, Torsten Curdt wrote:
But that doesn't look like a real replacement. Shouldn't there be a stringWithCString:length:encoding What am I missing? Pointers? Comments? Suggestions?
My guess is that in deprecating this they also took the opportunity to remove an API that really doesn't make sense. A string in C is defined to be terminated by a NULL byte, so any array of characters that contains NULL bytes that doesn't terminate them isn't a C string. Perhaps also it eliminates a possible source of buffer overruns that are known to be a security issue.
If you have an array of characters that contain NULL bytes you'll have to scan them into a string in a different way.
--Graham _______________________________________________ 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