View Full Version : Convert NSMutableData to NSString
arme
Sep 23, 2008, 07:58 AM
how i can compare NSMulateData to NSString?
robbieduncan
Sep 23, 2008, 08:02 AM
As long as you know what the encoding is you can easily turn the data object into a string with the obvious initWithData:encoding: (http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/Reference/NSString.html#//apple_ref/occ/instm/NSString/initWithData:encoding:) method of NSString.
Instead of continually posting very basic questions have you tried looking at the documentation first? It's a core skill of being a programmer. If you want to turn a NSMutableData object into a NSString object would it not make sense to look at the documentation for these two classes first?
vBulletin® v3.8.6, Copyright ©2000-2012, Jelsoft Enterprises Ltd.