Update Home
18
Home.md
18
Home.md
@@ -31,21 +31,3 @@ dependencies {
|
|||||||
implementation("com.infendro:encoding:1.2.0")
|
implementation("com.infendro:encoding:1.2.0")
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
```kotlin
|
|
||||||
import com.infendro.encoding.Base16
|
|
||||||
|
|
||||||
fun main() {
|
|
||||||
// the string to encode
|
|
||||||
val test = "Hello World!"
|
|
||||||
.encodeToByteArray().asUByteArray()
|
|
||||||
|
|
||||||
// encode the string with the desired encoding
|
|
||||||
val encoded = Base16.encode(test)
|
|
||||||
.asByteArray().decodeToString()
|
|
||||||
|
|
||||||
println(encoded) // 48656c6c6f20576f726c6421
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|||||||
Reference in New Issue
Block a user