padStart

fun ByteArray.padStart(length: Int, padValue: Byte): ByteArray(source)

Pads the current ByteArray with the specified padValue at the beginning, making it equal to or larger than the specified length.

Return

The padded ByteArray with the specified length.

Parameters

length

The desired length for the new ByteArray.

padValue

The value used to pad the ByteArray.