How to convert NSMutableData to NSString on iPhone?

I got NSMutableData from the server and now I want to convert it to NSString. Any ideas on how to do this?

+51
string iphone typeconverter
Feb 27 '09 at 3:05
source share
1 answer

You can use the initializer initWithData: ::

 [[NSString alloc] initWithData:data encoding:NSASCIIStringEncoding]; 

Change the encoding to the original data.

+79
Feb 27 '09 at 3:22
source share



All Articles