Convert from char* to NSString?

前端 未结 1 1074

What is the best way to convert from char * to an instance of NSString?
I used the method -stringWithUTF8String:, but it\'s not go

1条回答
  •  日久生厌
    2021-01-12 18:41

    Create the string using the same method you're using now. Then, use a method like -stringByTrimmingCharactersInSet: to create the trimmed string that you really want.

    0 讨论(0)
提交回复
热议问题