fix padEnd
This commit is contained in:
2 files changed
+2
-2
No files matched your search
@@ -52,10 +52,10 @@ fun ByteArray.padEnd(
|
||||
padByte: Byte,
|
||||
): ByteArray {
|
||||
return buildList {
|
||||
addAll(this)
|
||||
repeat(length - size) {
|
||||
add(padByte)
|
||||
}
|
||||
addAll(this)
|
||||
}.toByteArray()
|
||||
}
|
||||
|
||||
|
||||
@@ -49,10 +49,10 @@ fun UByteArray.padEnd(
|
||||
padByte: UByte,
|
||||
): UByteArray {
|
||||
return buildList {
|
||||
addAll(this)
|
||||
repeat(length - size) {
|
||||
add(padByte)
|
||||
}
|
||||
addAll(this)
|
||||
}.toUByteArray()
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user