https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
a

alexfacciorusso

01/28/2019, 12:42 PM
hey guys, silly question: what's the best way of formatting a Float/Double to String with a given number of decimals in Kotlin common?
a

Ashley Figueira

01/28/2019, 2:04 PM
"%.2f".format(value)
a

alexfacciorusso

01/28/2019, 2:14 PM
you can't do it in Kotlin multiplatform, unfortunately: the format() String extension is not in Kotlin common 😕
m

Mustafa Ozhan

03/16/2021, 5:38 PM
@alexfacciorusso did you find a workaround for this ?