contentToString

Common
JVM
JS
Native
1.1
@DeprecatedSinceKotlin("1.4") fun <T> Array<out T>.contentToString(): String
Deprecated: Use Kotlin compiler 1.4 to avoid deprecation warning.
Common
JVM
JS
Native
1.1
@DeprecatedSinceKotlin("1.4") fun ByteArray.contentToString(): String
Deprecated: Use Kotlin compiler 1.4 to avoid deprecation warning.
Common
JVM
JS
Native
1.1
@DeprecatedSinceKotlin("1.4") fun ShortArray.contentToString(): String
Deprecated: Use Kotlin compiler 1.4 to avoid deprecation warning.
Common
JVM
JS
Native
1.1
@DeprecatedSinceKotlin("1.4") fun IntArray.contentToString(): String
Deprecated: Use Kotlin compiler 1.4 to avoid deprecation warning.
Common
JVM
JS
Native
1.1
@DeprecatedSinceKotlin("1.4") fun LongArray.contentToString(): String
Deprecated: Use Kotlin compiler 1.4 to avoid deprecation warning.
Common
JVM
JS
Native
1.1
@DeprecatedSinceKotlin("1.4") fun FloatArray.contentToString(): String
Deprecated: Use Kotlin compiler 1.4 to avoid deprecation warning.
Common
JVM
JS
Native
1.1
@DeprecatedSinceKotlin("1.4") fun DoubleArray.contentToString(): String
Deprecated: Use Kotlin compiler 1.4 to avoid deprecation warning.
Common
JVM
JS
Native
1.1
@DeprecatedSinceKotlin("1.4") fun BooleanArray.contentToString(): String
Deprecated: Use Kotlin compiler 1.4 to avoid deprecation warning.
Common
JVM
JS
Native
1.1
@DeprecatedSinceKotlin("1.4") fun CharArray.contentToString(): String
Deprecated: Use Kotlin compiler 1.4 to avoid deprecation warning.
Common
JS
Native
1.4
fun <T> Array<out T>?.contentToString(): String
JVM
1.4
@JvmName("contentToStringNullable") fun <T> Array<out T>?.contentToString(): String
Common
JS
Native
1.4
fun ByteArray?.contentToString(): String
JVM
1.4
@JvmName("contentToStringNullable") fun ByteArray?.contentToString(): String
Common
JS
Native
1.4
fun ShortArray?.contentToString(): String
JVM
1.4
@JvmName("contentToStringNullable") fun ShortArray?.contentToString(): String
Common
JS
Native
1.4
fun IntArray?.contentToString(): String
JVM
1.4
@JvmName("contentToStringNullable") fun IntArray?.contentToString(): String
Common
JS
Native
1.4
fun LongArray?.contentToString(): String
JVM
1.4
@JvmName("contentToStringNullable") fun LongArray?.contentToString(): String
Common
JS
Native
1.4
fun FloatArray?.contentToString(): String
JVM
1.4
@JvmName("contentToStringNullable") fun FloatArray?.contentToString(): String
Common
JS
Native
1.4
fun DoubleArray?.contentToString(): String
JVM
1.4
@JvmName("contentToStringNullable") fun DoubleArray?.contentToString(): String
Common
JS
Native
1.4
fun BooleanArray?.contentToString(): String
JVM
1.4
@JvmName("contentToStringNullable") fun BooleanArray?.contentToString(): String
Common
JS
Native
1.4
fun CharArray?.contentToString(): String
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
}
Common
JVM
JS
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
}