zeroPad

fun Int.zeroPad(width: Int): String(source)

Pads an integer with leading zeros to the given width. Example: 7.zeroPad(3) → "007"