Re: char Array to NSString to cString?
Re: char Array to NSString to cString?
- Subject: Re: char Array to NSString to cString?
- From: Tomas Franzén <email@hidden>
- Date: Fri, 1 Jun 2007 19:18:09 +0200
On 1 jun 2007, at 17.15, Vince Ackerman wrote:
I'm having a bit of trouble trying to convert an array of 7
(unsigned char) to a NSString. I need to pass this array of hex
values to another object that is expecting an NSString that it will
convert to a C string and send it out the serial port
(unsigned char) myArray[7];
Hi,
Unless I've missed something, can't you just write it directly,
instead of going through NSString (or NSData)?
write(fileDescriptor, myArray, sizeof(myArray));
Tomas Franzén
Lighthead Software
http://www.lightheadsw.com/
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden