On 25/03/2009, at 6:03 AM, Brian Chapados wrote:
Since you have an NSData object, you should be able to convert it to a
String (NSString) and then use unpack. For example:
socket_port = NSSocketPort.alloc.initWithTCPPort(1)
addr = socket_port.address
addr_str = NSString.alloc.initWithData
Hi Pete,
Since you have an NSData object, you should be able to convert it to a
String (NSString) and then use unpack. For example:
socket_port = NSSocketPort.alloc.initWithTCPPort(1)
addr = socket_port.address
addr_str = NSString.alloc.initWithData(addr,
encoding:NSString.defaultCStringEnco
Did I miss the answer to this one?
I have a similar issue returning bytes, voids, GLfloats etc
J
On Mar 22, 2009, at 11:18 PM, Pete Yandell wrote:
I'd like to use something like Ruby's String#unpack to pull some
info out of an NSData, but I'm stumped as to how to do it.
NSData.bytes returns