contentToString

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

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
(source)
Deprecated: Use Kotlin compiler 1.4 to avoid deprecation warning.
@DeprecatedSinceKotlin("1.4") @ExperimentalUnsignedTypes fun ULongArray.contentToString(): String
(source)
Deprecated: Use Kotlin compiler 1.4 to avoid deprecation warning.
@DeprecatedSinceKotlin("1.4") @ExperimentalUnsignedTypes fun UByteArray.contentToString(): String
(source)
Deprecated: Use Kotlin compiler 1.4 to avoid deprecation warning.
@DeprecatedSinceKotlin("1.4") @ExperimentalUnsignedTypes fun UShortArray.contentToString(): String
(source)
Deprecated: Use Kotlin compiler 1.4 to avoid deprecation warning.
@ExperimentalUnsignedTypes fun UIntArray?.contentToString(): String
(source)
@ExperimentalUnsignedTypes fun ULongArray?.contentToString(): String
(source)
@ExperimentalUnsignedTypes fun UByteArray?.contentToString(): String
(source)
@ExperimentalUnsignedTypes fun UShortArray?.contentToString(): String
(source)

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
}