• 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: Making an NSString from NSData
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Making an NSString from NSData


  • Subject: Re: Making an NSString from NSData
  • From: Vince DeMarco <email@hidden>
  • Date: Tue, 23 Oct 2001 08:50:27 -0700

On Monday, October 22, 2001, at 07:13 pm, Sam Goldman wrote:

How do I make an NSString into NSData? Do have to go through every byte and
put that into a string? I don't really know what NSData is because it can
contain images (as I learned from cocoadevcentral's image buddy) and I just
don9t know what its content would be. Sorry for the newbie question, but I
couldn't do it when I tried.

- Sam
_______________________________________________
cocoa-dev mailing list
email@hidden
http://www.lists.apple.com/mailman/listinfo/cocoa-dev

Try one of these methods on NSString

- (NSData *)dataUsingEncoding:(NSStringEncoding)encoding allowLossyConversion:(BOOL)lossy;
- (NSData *)dataUsingEncoding:(NSStringEncoding)encoding;


vince


References: 
 >Making an NSString from NSData (From: Sam Goldman <email@hidden>)

  • Prev by Date: Re: Dockling
  • Next by Date: Selecting multiple cells in a NSMatrix
  • Previous by thread: Re: Making an NSString from NSData
  • Next by thread: Re: Making an NSString from NSData
  • Index(es):
    • Date
    • Thread