I have following variables
NSString* balance = @"43243534.4535345"
int decimalPoint = 2;
How can we place commas after three digits while managing decimal point according to given variable at same time. It's easy to do these action separately but how can we perform them together so result should be: 43,243,534.45
You can use
NSNumberFormatter
:in Swift: