Something like:

messageString = [[NSString alloc] initWithData:(NSData*)data encoding:NSASCIIStringEncoding];

the encoding type will depend on what encoding you expect the data to be in.


On Jun 10, 2008, at 4:08 AM, Angelo Chen wrote:

What is the correct way to cast from CFDataRef to NSString, I have this code:

CFDataRef data;
NSString *messageString = [NSString stringWithCString:CFDataGetBytePtr(data)];

it always return this warning, any idea?

warning:pointer targets in passing argument 1 of 'stringWithCString:' differ in signedness

Thanks

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to