What is the best way to convert from char * to an instance of NSString? I used the method -stringWithUTF8String:, but it\'s not go
char *
NSString
-stringWithUTF8String:
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.
-stringByTrimmingCharactersInSet: