toUTF8String

fun ByteArray?.toUTF8String(size: Int = this?.size ?: 0): String

Create a String from a ByteArray using the UTF-8 charset

Parameters

size

The numbers of characters to include (used to remove excess null bytes)