I am fairly new to Swift and having a great deal of trouble finding a way to add a space as a thousand separator.
What I am hoping to achieve is taking the result
Code:
//5000000 let formatter = NumberFormatter() formatter.groupingSeparator = " " formatter.locale = Locale(identifier: "en_US") formatter.numberStyle = .decimal.
Output:
5 000 000