Created
February 2, 2017 08:39
-
-
Save avanish/36d4d0ce6be102e4244c8442320ebb21 to your computer and use it in GitHub Desktop.
Currency Formatter for Nepali Rupees
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
// Convert the currency format: 1,000,000 to Rs.10,00,00 | |
// | |
// Initialization | |
NSNumberFormatter *currencyFormatter = [[NSNumberFormatter alloc] init]; | |
[currencyFormatter setNumberStyle:NSNumberFormatterCurrencyStyle]; | |
[currencyFormatter setCurrencySymbol:@"Rs."]; | |
[currencyFormatter setLocale:[[NSLocale alloc] initWithLocaleIdentifier:@"en_IN"]]; | |
NSString *str = [currencyFormatter stringFromNumber:[NSNumber numberWithFloat:price]]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment