stringWithCString:length deprecation
stringWithCString:length deprecation
- Subject: stringWithCString:length deprecation
- From: Torsten Curdt <email@hidden>
- Date: Wed, 7 Oct 2009 14:00:02 +0200
Hey folks,
I am in the middle of cleaning up code and moving it to 10.5+ 64bit.
For most things it's quite straight forward, but one of the
deprecations to get rid of is:
stringWithCString:length
cString must not be NULL. cString should contain characters in the
default C-string encoding. This method converts length * sizeof(char)
bytes from cString and doesn’t stop short at a NULL character.
The docs say one should use instead
stringWithCString:encoding
A C array of bytes. The array must end with a NULL character;
intermediate NULL characters are not allowed.
But that doesn't look like a real replacement. Shouldn't there be a
stringWithCString:length:encoding
What am I missing?
Pointers? Comments? Suggestions?
cheers
--
Torsten
_______________________________________________
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