I have a NSString I am getting from an array. There are multiple string objects in the array. I want to change the format of the string I get from array and display that new formatted string on UILabel. Let me give an example:
String in array: 539000
String I want to display: 5.390.00
Now the problem is that the string I get from array may be 539000, 14200 or 9050. So the string I want to get are: 5.390.00, 142.00, 90.50.
The correct format is to place a **.** before last two digits, again place a **.** before 3 digits from first **.**.
Try below code it will help
Objective-C
Swift3