Re: NUL characters in NSString cause unexpected results
Re: NUL characters in NSString cause unexpected results
- Subject: Re: NUL characters in NSString cause unexpected results
- From: Rosyna <email@hidden>
- Date: Thu, 23 Nov 2006 00:09:01 -0700
That's odd since it just calls CFStringCreateWithBytes() and
CFStringCreateWithBytes() has no such note. Bizarre.
Ack, at 11/22/06, Scott Stevenson said:
To be fair, the class reference for NSString is pretty upfront about this:
-initWithBytes:length:encoding:
Returns an initialized NSString object containing a given
number of bytes from
a given C array of bytes in a given encoding.
bytes: A C array of bytes in the encoding specified by
encoding. The array
must not contain NULL.
<http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/Reference/NSString.html>
--
Sincerely,
Rosyna Keller
Technical Support/Carbon troll/Always needs a hug
Unsanity: Unsane Tools for Insanely Great People
It's either this, or imagining Phil Schiller in a thong.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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