• 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: Corrupted NSMutableString
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Corrupted NSMutableString


  • Subject: Re: Corrupted NSMutableString
  • From: mmalcolm crawford <email@hidden>
  • Date: Sat, 2 Aug 2003 10:20:17 -0700

On Saturday, August 2, 2003, at 10:00 AM, Alastair J.Houghton wrote:

There are several ways to swap bytes; [...] Alternatively, you can do things like
x = ((x >> 16) & 0x0000ffff) | ((x << 16) & 0xffff0000);
x = ((x >> 8) & 0x00ff00ff) | ((x << 8) & 0xff00ff00);
which will swap the bytes in a 32-bit variable "x".

There are also a number of NS and CF utilities (the former call the latter) such as NSSwapShort, NSSwapLittleShortToHost and NSSwapBigLongLongToHost -- see NSByteOrder.h.

mmalc
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: Corrupted NSMutableString (From: "Alastair J.Houghton" <email@hidden>)

  • Prev by Date: Re: Corrupted NSMutableString
  • Next by Date: Re: NSImage -- getting raw bitmap data
  • Previous by thread: Re: Corrupted NSMutableString
  • Next by thread: Re: Corrupted NSMutableString
  • Index(es):
    • Date
    • Thread