Re: int to bytes(value in NSString)
Re: int to bytes(value in NSString)
- Subject: Re: int to bytes(value in NSString)
- From: bosco fdo <email@hidden>
- Date: Wed, 19 Aug 2009 09:30:07 +0800
Hi all
I dont want in binaries('1', '0'),
but i want to convert int to bytes(byte value string)
for example in java working code when i convert int value 1 to byte
value in 4 square like chars(unreadable format)
the same thing i need to do in objective c
thanks for the help
bos
On Tue, Aug 18, 2009 at 2:56 PM, Andrew Farmer <email@hidden> wrote:
>
> On 17 Aug 2009, at 23:21, bosco fdo wrote:
>>
>> Hi graham
>> Thanks for the reply. I have tried %i.1 but i am getting 0.10.10.10.1 ,
>> but i need it in binary byte value
>
> Wait, you're trying to construct a NSString with null bytes in it? I'm pretty sure that doesn't work correctly in a lot of circumstances - NSString is primarily intended for representing a sequence of characters, not an arbitrary set of bytes. What you probably want instead is NSData.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden