NSString char *互相转换

  //NSString转换char

    NSString * str1= @"Test";

    const char * c1 =[str1 UTF8String];

    //char转换NSString

    const char * c2 ="test";

    NSString *str2 = [NSStringstringWithUTF8String:c2];

 



posted on 2013-01-25 12:07  南瓜饼  阅读(168)  评论(0编辑  收藏  举报

导航