Created
July 27, 2012 19:18
-
-
Save sspencer/3189941 to your computer and use it in GitHub Desktop.
Format Decimal Number with Thousands Separator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NSNumberFormatter *formatter = [[NSNumberFormatter alloc] init]; | |
[formatter setNumberStyle:NSNumberFormatterDecimalStyle]; | |
NSLog(@"formatted: %@", [formatter stringFromNumber:[NSNumber numberWithInt:1234567]]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment