Skip to content

Instantly share code, notes, and snippets.

@Duraiamuthan
Created September 22, 2013 06:50
Show Gist options
  • Save Duraiamuthan/6657383 to your computer and use it in GitHub Desktop.
Save Duraiamuthan/6657383 to your computer and use it in GitHub Desktop.
objective c format number as comma added currency
NSNumberFormatter *currencyFormatter = [[[NSNumberFormatter alloc] init] autorelease];
[currencyFormatter setNumberStyle:NSNumberFormatterCurrencyStyle];
double d2 = 3432.89;
NSString *strCurrency = [currencyFormatter stringFromNumber:[NSNumber numberWithDouble:d2]];
NSLog(@"%@", strCurrency);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment