In Kotlin, you can use format() function.
val minutes = 5val strMinutes = "%02d".format(minutes)
where, 2 is the total number of digits you want to display(including zero).
Output: 05
In Kotlin, you can use format() function.
val minutes = 5val strMinutes = "%02d".format(minutes)
where, 2 is the total number of digits you want to display(including zero).
Output: 05