Your number is obviously out of scope.
This works:
UInt64 sum = 1649463153695818612UL;
NSString *sumString = [ NSNumberFormatter
localizedStringFromNumber:@(sum)
numberStyle:NSNumberFormatterDecimalStyle];
printf("%s",[sumString UTF8String]);
Greetings from Switzerland, Ronald Hofmann
---
> Am 11.10.2014 um 08:03 schrieb Gerriet M. Denkmann <[email protected]>:
>
> On iOS 8.0:
>
> UInt64 sum = 16494631536958186120UL;
> NSString *sumString = [ NSNumberFormatter
> localizedStringFromNumber: @(sum)
>
> numberStyle: NSNumberFormatterDecimalStyle
> ];
> results in sumString = -1,952,112,536,751,365,496, which seems not quite
> right.
>
> How can I convince NSNumberFormatter that it should print unsigned integers?
>
> Gerriet.
>
>
> _______________________________________________
>
> Cocoa-dev mailing list ([email protected])
>
> 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:
> https://lists.apple.com/mailman/options/cocoa-dev/prolog%40jumbosoft.de
>
> This email sent to [email protected]
_______________________________________________
Cocoa-dev mailing list ([email protected])
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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to [email protected]