• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NUL characters in NSString cause unexpected results
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: NUL characters in NSString cause unexpected results
      • From: Scott Stevenson <email@hidden>
References: 
 >NUL characters in NSString cause unexpected results (From: Jerry Krinock <email@hidden>)
 >Re: NUL characters in NSString cause unexpected results (From: Scott Stevenson <email@hidden>)

  • Prev by Date: Re: NUL characters in NSString cause unexpected results
  • Next by Date: How to set the color of a string on a NSButton?
  • Previous by thread: Re: NUL characters in NSString cause unexpected results
  • Next by thread: Re: NUL characters in NSString cause unexpected results
  • Index(es):
    • Date
    • Thread