Add html dokka and ubyte array decode extension
This commit is contained in:
parent
48d81f257e
commit
6a87267ed6
@ -601,6 +601,16 @@ tasks {
|
||||
|
||||
|
||||
}
|
||||
|
||||
dokkaHtml {
|
||||
println("Dokka Html!")
|
||||
dokkaSourceSets {
|
||||
create("commonMain") {
|
||||
displayName = "common"
|
||||
platform = "common"
|
||||
}
|
||||
}
|
||||
}
|
||||
if (getHostOsName() == "linux" && getHostArchitecture() == "x86-64") {
|
||||
val jvmTest by getting(Test::class) {
|
||||
testLogging {
|
||||
|
@ -9,10 +9,14 @@ fun String.hexStringToUByteArray() : UByteArray {
|
||||
return this.chunked(2).map { it.toUByte(16) }.toUByteArray()
|
||||
}
|
||||
|
||||
fun String.encodeToUByteArray() : UByteArray{
|
||||
fun String.encodeToUByteArray() : UByteArray{
|
||||
return encodeToByteArray().asUByteArray()
|
||||
}
|
||||
|
||||
fun UByteArray.decodeFromUByteArray() : String {
|
||||
return asByteArray().decodeToString()
|
||||
}
|
||||
|
||||
fun UByteArray.toHexString() : String {
|
||||
return this.joinToString(separator = "") {
|
||||
if (it <= 0x0FU) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user