fix padEnd

This commit is contained in:
2025-11-10 15:52:24 +01:00
parent f647abc0a4
commit bd9531b60b
2 changed files with 2 additions and 2 deletions

View File

@@ -52,10 +52,10 @@ fun ByteArray.padEnd(
padByte: Byte, padByte: Byte,
): ByteArray { ): ByteArray {
return buildList { return buildList {
addAll(this)
repeat(length - size) { repeat(length - size) {
add(padByte) add(padByte)
} }
addAll(this)
}.toByteArray() }.toByteArray()
} }

View File

@@ -49,10 +49,10 @@ fun UByteArray.padEnd(
padByte: UByte, padByte: UByte,
): UByteArray { ): UByteArray {
return buildList { return buildList {
addAll(this)
repeat(length - size) { repeat(length - size) {
add(padByte) add(padByte)
} }
addAll(this)
}.toUByteArray() }.toUByteArray()
} }