From NSString to NSData and back

Simple, still useful code snippet:

NSString* str= @"string";

NSData* nsData= [str dataUsingEncoding:NSUTF8StringEncoding];
NSString* nsString = [[NSString alloc] initWithData: nsData 
                                       encoding:NSUTF8StringEncoding];