contentToString
fun ByteArray.contentToString(): Stringfun ShortArray.contentToString(): Stringfun IntArray.contentToString(): Stringfun LongArray.contentToString(): Stringfun FloatArray.contentToString(): Stringfun DoubleArray.contentToString(): Stringfun BooleanArray.contentToString(): Stringfun CharArray.contentToString(): StringReturns a string representation of the contents of the specified array as if it is List.
import kotlin.test.*
fun main(args: Array<String>) {
//sampleStart
val array = arrayOf("apples", "oranges", "lime")
println(array.contentToString()) // [apples, oranges, lime]
//sampleEnd
}@ExperimentalUnsignedTypes fun UIntArray.contentToString(): String@ExperimentalUnsignedTypes fun ULongArray.contentToString(): String@ExperimentalUnsignedTypes fun UByteArray.contentToString(): String@ExperimentalUnsignedTypes fun UShortArray.contentToString(): StringReturns a string representation of the contents of the specified array as if it is List.
import kotlin.test.*
fun main(args: Array<String>) {
//sampleStart
val array = arrayOf("apples", "oranges", "lime")
println(array.contentToString()) // [apples, oranges, lime]
//sampleEnd
}