On Sun, Jan 11, 2009 at 1:24 AM,  <ewan.dela...@math.unicaen.fr> wrote:
>   This is what I did in my project, using the code below. I can't
> help feeling that this code is dirty because it relies on the character
> for the "j" digit being indexed as unichar number j+48. Can anyone
> tell me what would be the clean way to do this ?

Would be much cleaner IMO to simply use the built-in function strtoull:

- (unsigned long long)unsignedLongLongValue { return strtoull([self
UTF8String], NULL, 0); }

If you need error checking then it can also be accomplished using this
function with a little more work.

Mike
_______________________________________________

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

Reply via email to