Strings In Depth9 / 17
Up next

padStart and padEnd

fun main() {
    // pad on the left with zeros to width 5
    println("42".padStart(5, '0'))
    println("hi".padEnd(5, '.'))
}
What you're solving

align text to a fixed width