Re: Corrupted NSMutableString
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.