Converting an NSString* to char?

后端 未结 1 1291
春和景丽
春和景丽 2021-01-31 16:05

How can I convert a NSString* into a char?

EDIT: Thanks to Vladimir for getting me there!

NSString *myString = @\"HelloWorld\";
const char *stringAsChar          


        
相关标签:
1条回答
  • 2021-01-31 16:46

    Simple to transfer

    const char *cfilename=[stringobject UTF8String];
    
    0 讨论(0)
提交回复
热议问题