Re: NSString XOR
Re: NSString XOR
- Subject: Re: NSString XOR
- From: Fritz Anderson <email@hidden>
- Date: Sat, 16 Jul 2005 12:15:20 -0500
On 16 Jul 2005, at 11:59 AM, Kevin Ballard wrote:
Erm, is that code legal? Doesn't the buffer array length have to be
a constant?
...
On Jul 15, 2005, at 9:21 PM, Allan Hsu wrote:
You can also get a Unicode character buffer from a string very
easily and then treat it as a byte array to perform your XOR
operation:
UniChar buffer[[string length]];
[string getCharacters:buffer];
Now you have a buffer of length ([string length] * sizeof
(UniChar)) that you can do with as you like.
It's an extension in GCC, and part of the standard in C99 (6.7.5.2 ΒΆ1).
-- F
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden