Skip to content Skip to sidebar Skip to footer

How To Change The Format Of Numbers In .csv Data Kotlin

I receive the data from sensors and save it in an .csv file. but the formatt that I have is like 0.234.234.234.123.5434 What I Need is the Format like this 0,23452342234234234 priv

Solution 1:

Try this :

var value:String  ="0.234.234.234.123.5434"
value = value.replaceFirst(".", ",")
value = value.replace(".","")

println(" : "+value)

Output :

 : 0,2342342341235434

Post a Comment for "How To Change The Format Of Numbers In .csv Data Kotlin"