Add html dokka and ubyte array decode extension

This commit is contained in:
Ugljesa Jovanovic 2020-11-15 19:43:08 +01:00
parent 48d81f257e
commit 6a87267ed6
No known key found for this signature in database
GPG Key ID: 178E6DFCECCB0E0F
2 changed files with 15 additions and 1 deletions

View File

@ -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 {

View File

@ -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) {