On June 26, 2009, In iPhone Dev Tips, By Graham F
Another quick tip!
If you need to convert from an NSString format to a Char format, it’s a really easy one line of code as follows;
const char *fooBar = [barFoo UTF8String];
Here, fooBar is your new Char and barFoo is your previously allocated NSString.
Simple!
Cheers
Graham