Radoslaw Juszczyk
07/08/2022, 7:54 PM.
with pure kotlin?
I can see that .format
in kotlin stdlib uses java java.lang.String.format
so it depends on the current locale whether it is .
or ,
I want to be able to enforce it to use .
.Radoslaw Juszczyk
07/08/2022, 8:16 PMLandry Norris
07/08/2022, 10:29 PMRadoslaw Juszczyk
07/09/2022, 8:36 AMephemient
07/09/2022, 8:50 AMString.format
on JVM, there is an overload with a Locale
parameterRadoslaw Juszczyk
07/09/2022, 8:54 AMcommonMain
and use it later in iOS project too. So I was hoping there is pure kotlin function.
Anyway for now I wrote a simple function which achieves the same with stringbuilder and bunch of multiplications and modulo operations.ephemient
07/09/2022, 9:02 AMDouble.toString()
does not depend on locale and always uses .
(although its output does vary slightly on different platforms)