Search snippets
Browse Code Answers
FAQ
Usage docs
Log In
Sign Up
Home
Kotlin
Kotlin round double string
Slbox
Programming language:
Kotlin
2021-03-02 00:22:58
0
Q:
Kotlin round double string
Uygar Ucar
Code:
Kotlin
2021-07-15 16:13:51
val number = 10.7086134 val rounded = String.format("%.3f", number) // rounds to 3 decimal places
1
Tags
string
Related
remove double quotes from string kotlin
Kotlin ternary
New to Communities?
Join the community