Kotlin String Templates Format Double with Decimals

July 25, 2018
Use Kotlin String.format instead

Sadly, there is no built-in support for String Templates formating.

Use Kotlin String.format instead.

val location = "%.6f, %.6f".format(lat, lng)
This work is licensed under a
Creative Commons Attribution-NonCommercial 4.0 International License.