Possible Duplicate:
Convert UTF-8 encoded NSData to NSString
I need to to convert the NSData read from file to NSString. How to do it?
NSString
provides an initializer for this purpose.
// NSData *data = [NSData data]; NSString *string = [[[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding] autorelease];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With