Re: Making an NSString from NSData
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