开发者

Converting an NSString* to char?

How can I convert a NSString* into a char?

EDIT: Thanks to Vladimir for getting me t开发者_运维技巧here!

NSString *myString = @"HelloWorld";
const char *stringAsChar = [myString cStringUsingEncoding:[NSString defaultCStringEncoding]];

Hope this helps someone in the future!


Simple to transfer

const char *cfilename=[stringobject UTF8String];
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜