padded

fun <T> List<T>.padded(size: Int, element: T): List<T>

Returns a copy of this list grown to size elements by appending element.

When size is not greater than the current size, including when it is negative, the copy is returned unchanged.