• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSString XOR
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
References: 
 >NSString XOR (From: Derrick Carlin <email@hidden>)
 >Re: NSString XOR (From: Fritz Anderson <email@hidden>)
 >Re: NSString XOR (From: Allan Hsu <email@hidden>)
 >Re: NSString XOR (From: Kevin Ballard <email@hidden>)

  • Prev by Date: Re: NSString XOR
  • Next by Date: Re: setting the cursor from an NSBackgroundOnly app
  • Previous by thread: Re: NSString XOR
  • Next by thread: Intercepting and forwarding delegate messages
  • Index(es):
    • Date
    • Thread