Question

I wanna have a NSString object as NSData. Later this NSData-Object should return his stringValue with:

NSData *data;
NSString *string = [[NSString alloc] initWithData:data 
                                         encoding:NSUTF8StringEncoding];

string shouldn't be nil... =D

Was it helpful?

Solution

dataUsingEncoding:

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top