fun <T> Array<out T>.contentToString(): String
fun ByteArray.contentToString(): String
fun ShortArray.contentToString(): String
fun IntArray.contentToString(): String
fun LongArray.contentToString(): String
fun FloatArray.contentToString(): String
fun DoubleArray.contentToString(): String
fun BooleanArray.contentToString(): String
fun CharArray.contentToString(): String
Returns 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(): String
Returns 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
}
© 2010–2019 JetBrains s.r.o.
Licensed under the Apache License, Version 2.0.
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/content-to-string.html