padding

fun String.padding(padding: PaddingConfig.() -> Unit): String

Returns transformed string with padding specified by PaddingConfig. Example usage:

val transformedString = "test".padding {
top = 2
bottom = 1
left = 4
right = 3
}

Result:

_
_
____test___
_

fun String.padding(value: Int): String

Returns transformed string with padding specified by value. Padding is applied in all directions. Example usage:

val transformedString = "test".padding(5)

Result:

_
_
_
_
_
_____test_____
_
_
_
_
_