On 08 May 09, at 08:47, Greg Guerin wrote:
A string is a sequence of characters. Retrieve each character, determine its bit-pattern, then append that pattern to an NSMutableString. Now you have to figure out how to turn a character into its bit-pattern. So break that down.
One extra complication: By Cocoa's standards, a string is not a sequence of bytes: it's a sequence of Unicode codepoints.* To treat a string as a "bag of bytes", you will first need to choose a text encoding to treat the text as, then convert it using the NSString dataUsingEncoding: method.
If all you're working with is standard ASCII characters, though, this shouldn't be an issue.
_______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com