contentToString

Platform and version requirements: JVM (1.1), JS (1.1), Native (1.1)
@DeprecatedSinceKotlin("1.4") fun <T> Array<out T>.contentToString(): String
Deprecated: Use Kotlin compiler 1.4 to avoid deprecation warning.
Platform and version requirements: JVM (1.1), JS (1.1), Native (1.1)
@DeprecatedSinceKotlin("1.4") fun ByteArray.contentToString(): String
Deprecated: Use Kotlin compiler 1.4 to avoid deprecation warning.
Platform and version requirements: JVM (1.1), JS (1.1), Native (1.1)
@DeprecatedSinceKotlin("1.4") fun ShortArray.contentToString(): String
Deprecated: Use Kotlin compiler 1.4 to avoid deprecation warning.
Platform and version requirements: JVM (1.1), JS (1.1), Native (1.1)
@DeprecatedSinceKotlin("1.4") fun IntArray.contentToString(): String
Deprecated: Use Kotlin compiler 1.4 to avoid deprecation warning.
Platform and version requirements: JVM (1.1), JS (1.1), Native (1.1)
@DeprecatedSinceKotlin("1.4") fun LongArray.contentToString(): String
Deprecated: Use Kotlin compiler 1.4 to avoid deprecation warning.
Platform and version requirements: JVM (1.1), JS (1.1), Native (1.1)
@DeprecatedSinceKotlin("1.4") fun FloatArray.contentToString(): String
Deprecated: Use Kotlin compiler 1.4 to avoid deprecation warning.
Platform and version requirements: JVM (1.1), JS (1.1), Native (1.1)
@DeprecatedSinceKotlin("1.4") fun DoubleArray.contentToString(): String
Deprecated: Use Kotlin compiler 1.4 to avoid deprecation warning.
Platform and version requirements: JVM (1.1), JS (1.1), Native (1.1)
@DeprecatedSinceKotlin("1.4") fun BooleanArray.contentToString(): String
Deprecated: Use Kotlin compiler 1.4 to avoid deprecation warning.
Platform and version requirements: JVM (1.1), JS (1.1), Native (1.1)
@DeprecatedSinceKotlin("1.4") fun CharArray.contentToString(): String
Deprecated: Use Kotlin compiler 1.4 to avoid deprecation warning.
Platform and version requirements: JS (1.4), Native (1.4)
fun <T> Array<out T>?.contentToString(): String
Platform and version requirements: JVM (1.4)
@JvmName("contentToStringNullable") fun <T> Array<out T>?.contentToString(): String
Platform and version requirements: JS (1.4), Native (1.4)
fun ByteArray?.contentToString(): String
Platform and version requirements: JVM (1.4)
@JvmName("contentToStringNullable") fun ByteArray?.contentToString(): String
Platform and version requirements: JS (1.4), Native (1.4)
fun ShortArray?.contentToString(): String
Platform and version requirements: JVM (1.4)
@JvmName("contentToStringNullable") fun ShortArray?.contentToString(): String
Platform and version requirements: JS (1.4), Native (1.4)
fun IntArray?.contentToString(): String
Platform and version requirements: JVM (1.4)
@JvmName("contentToStringNullable") fun IntArray?.contentToString(): String
Platform and version requirements: JS (1.4), Native (1.4)
fun LongArray?.contentToString(): String
Platform and version requirements: JVM (1.4)
@JvmName("contentToStringNullable") fun LongArray?.contentToString(): String
Platform and version requirements: JS (1.4), Native (1.4)
fun FloatArray?.contentToString(): String
Platform and version requirements: JVM (1.4)
@JvmName("contentToStringNullable") fun FloatArray?.contentToString(): String
Platform and version requirements: JS (1.4), Native (1.4)
fun DoubleArray?.contentToString(): String
Platform and version requirements: JVM (1.4)
@JvmName("contentToStringNullable") fun DoubleArray?.contentToString(): String
Platform and version requirements: JS (1.4), Native (1.4)
fun BooleanArray?.contentToString(): String
Platform and version requirements: JVM (1.4)
@JvmName("contentToStringNullable") fun BooleanArray?.contentToString(): String
Platform and version requirements: JS (1.4), Native (1.4)
fun CharArray?.contentToString(): String
Platform and version requirements: JVM (1.4)
@JvmName("contentToStringNullable") 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
}
Platform and version requirements: JVM (1.3), JS (1.3), Native (1.3)
@DeprecatedSinceKotlin("1.4") @ExperimentalUnsignedTypes fun UIntArray.contentToString(): String
Deprecated: Use Kotlin compiler 1.4 to avoid deprecation warning.
@DeprecatedSinceKotlin("1.4") @ExperimentalUnsignedTypes fun ULongArray.contentToString(): String
Deprecated: Use Kotlin compiler 1.4 to avoid deprecation warning.
@DeprecatedSinceKotlin("1.4") @ExperimentalUnsignedTypes fun UByteArray.contentToString(): String
Deprecated: Use Kotlin compiler 1.4 to avoid deprecation warning.
@DeprecatedSinceKotlin("1.4") @ExperimentalUnsignedTypes fun UShortArray.contentToString(): String
Deprecated: Use Kotlin compiler 1.4 to avoid deprecation warning.
@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–2021 JetBrains s.r.o. and Kotlin Programming Language contributors
Licensed under the Apache License, Version 2.0.
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/content-to-string.html