Compare commits

...

2 Commits

Author SHA1 Message Date
941a486217 bump version to 1.2.2
All checks were successful
/ publish (push) Successful in 2m32s
2025-11-10 18:08:28 +01:00
3a0a947fb0 fix padding
again
2025-11-10 18:08:21 +01:00
3 changed files with 9 additions and 9 deletions

View File

@@ -1,5 +1,5 @@
group = "com.infendro" group = "com.infendro"
version = "1.2.1" version = "1.2.2"
repositories { repositories {
mavenCentral() mavenCentral()

View File

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

View File

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