What I want.
A: $1.10 = $1.1
B: $0.10101010101 = $0.101010
What I've tried
Solution one - String(format: "%.6f", price)
This will do the following:
A: $1.100000 B: $0.1010101
So B is gets the correct outcome but A gets more decimals.
Solution two - numberFormatter.numberStyle = .decimal This gives the following outcome
A: $1.1 B: $0.1
So here A is correct but B gets rounded up.