contentToString

expect inline fun <T> Array<out T>.contentToString(): String(source)
expect inline fun ByteArray.contentToString(): String(source)
expect inline fun ShortArray.contentToString(): String(source)
expect inline fun IntArray.contentToString(): String(source)
expect inline fun LongArray.contentToString(): String(source)
expect inline fun FloatArray.contentToString(): String(source)
expect inline fun CharArray.contentToString(): String(source)

Deprecated

Use Kotlin compiler 1.4 to avoid deprecation warning.

Returns a string representation of the contents of the specified array as if it is List.

Since Kotlin

1.1

Samples

import kotlin.test.*

fun main() { 
   //sampleStart 
   val array = arrayOf("apples", "oranges", "lime")

println(array.contentToString()) // [apples, oranges, lime] 
   //sampleEnd
}