formatInvariant

fun formatInvariant(value: Double, decimalPlaces: Int): String(source)

Formats with a fixed dot separator and no grouping, whatever the locale.

For strings that are not read as prose: a CoT payload another client parses, or a value written out and read back. Localizing those turns "1.5" into "1,5" and breaks the reader.


fun formatInvariant(value: Float, decimalPlaces: Int): String(source)

Float overload of formatInvariant.