views:

1251

answers:

1

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

+1  A: 

dataUsingEncoding:

Peter Hosey