美文网首页
Kotlin notes

Kotlin notes

作者: 乘风破浪的程序员 | 来源:发表于2019-06-04 14:11 被阅读0次

一: Convert String To ByteArray And ByteArray to String (Kotlin)

val input = "This is a string"

// String to ByteArray
val byteArray = input.toByteArray(Charsets.UTF_8)

// ByteArray to String
val output = String(byteArray, Charsets.UTF_8)

相关文章

网友评论

      本文标题:Kotlin notes

      本文链接:https://www.haomeiwen.com/subject/ncilxctx.html