nickk
05/06/2019, 2:27 PMDouble.toString()
uses some default (?) locale , while String.format("%.1f")
uses the locale selected by the user.
So, I end up with two different decimal separators in the same message (both ‘,’ and ‘.’)
Is this expected behavior?Marc Knaup
05/06/2019, 4:58 PMtoString()
returns a machine-readable string which can be parsed again using toDouble()
formatting is more for human-readable strings (but I guess can also be used for machine-readable output by using the right locale)nickk
05/07/2019, 7:31 AMtoString()
uses the en-US
locale in all cases, apparently.
(though a quick google search does not result into links to official docs)Marc Knaup
05/07/2019, 8:57 AM