only 2 point float string format kotlin code example Example: only 2 point float string format kotlin String.format("%.3f", number).toDouble()