contentToString

Common
fun UIntArray.contentToString(): String
fun ULongArray.contentToString(): String
fun UByteArray.contentToString(): String
fun UShortArray.contentToString(): String

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

Since Kotlin

1.3

Samples

import samples.*
import kotlin.test.*
fun main() { 
   //sampleStart 
   val array = arrayOf("apples", "oranges", "lime")

assertPrints(array.contentToString(), "[apples, oranges, lime]") 
   //sampleEnd
}
Common
fun UIntArray?.contentToString(): String
fun ULongArray?.contentToString(): String
fun UByteArray?.contentToString(): String
fun UShortArray?.contentToString(): String
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.

Since Kotlin

1.4

Samples

import samples.*
import kotlin.test.*
fun main() { 
   //sampleStart 
   val array = arrayOf("apples", "oranges", "lime")

assertPrints(array.contentToString(), "[apples, oranges, lime]") 
   //sampleEnd
}
Common
@DeprecatedSinceKotlin(hiddenSince = "1.4")
fun <T> Array<out T>.contentToString(): String
@DeprecatedSinceKotlin(hiddenSince = "1.4")
fun ByteArray.contentToString(): String
@DeprecatedSinceKotlin(hiddenSince = "1.4")
fun ShortArray.contentToString(): String
@DeprecatedSinceKotlin(hiddenSince = "1.4")
fun IntArray.contentToString(): String
@DeprecatedSinceKotlin(hiddenSince = "1.4")
fun LongArray.contentToString(): String
@DeprecatedSinceKotlin(hiddenSince = "1.4")
fun FloatArray.contentToString(): String
@DeprecatedSinceKotlin(hiddenSince = "1.4")
fun DoubleArray.contentToString(): String
@DeprecatedSinceKotlin(hiddenSince = "1.4")
fun BooleanArray.contentToString(): String
@DeprecatedSinceKotlin(hiddenSince = "1.4")
fun CharArray.contentToString(): String

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

Since Kotlin

1.1

Samples

import samples.*
import kotlin.test.*
fun main() { 
   //sampleStart 
   val array = arrayOf("apples", "oranges", "lime")

assertPrints(array.contentToString(), "[apples, oranges, lime]") 
   //sampleEnd
}
@DeprecatedSinceKotlin(hiddenSince = "1.4")
inline fun <T> Array<out T>.contentToString(): String
@DeprecatedSinceKotlin(hiddenSince = "1.4")
inline fun ByteArray.contentToString(): String
@DeprecatedSinceKotlin(hiddenSince = "1.4")
inline fun ShortArray.contentToString(): String
@DeprecatedSinceKotlin(hiddenSince = "1.4")
inline fun IntArray.contentToString(): String
@DeprecatedSinceKotlin(hiddenSince = "1.4")
inline fun LongArray.contentToString(): String
@DeprecatedSinceKotlin(hiddenSince = "1.4")
inline fun FloatArray.contentToString(): String
@DeprecatedSinceKotlin(hiddenSince = "1.4")
inline fun DoubleArray.contentToString(): String
@DeprecatedSinceKotlin(hiddenSince = "1.4")
inline fun BooleanArray.contentToString(): String
@DeprecatedSinceKotlin(hiddenSince = "1.4")
inline fun CharArray.contentToString(): String

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

Since Kotlin

1.1

Samples

import samples.*
import kotlin.test.*
fun main() { 
   //sampleStart 
   val array = arrayOf("apples", "oranges", "lime")

assertPrints(array.contentToString(), "[apples, oranges, lime]") 
   //sampleEnd
}
JS
@DeprecatedSinceKotlin(hiddenSince = "1.4")
fun <T> Array<out T>.contentToString(): String
@DeprecatedSinceKotlin(hiddenSince = "1.4")
fun ByteArray.contentToString(): String
@DeprecatedSinceKotlin(hiddenSince = "1.4")
fun ShortArray.contentToString(): String
@DeprecatedSinceKotlin(hiddenSince = "1.4")
fun IntArray.contentToString(): String
@DeprecatedSinceKotlin(hiddenSince = "1.4")
fun LongArray.contentToString(): String
@DeprecatedSinceKotlin(hiddenSince = "1.4")
fun FloatArray.contentToString(): String
@DeprecatedSinceKotlin(hiddenSince = "1.4")
fun DoubleArray.contentToString(): String
@DeprecatedSinceKotlin(hiddenSince = "1.4")
fun BooleanArray.contentToString(): String
@DeprecatedSinceKotlin(hiddenSince = "1.4")
fun CharArray.contentToString(): String

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

Since Kotlin

1.1

Samples

import samples.*
import kotlin.test.*
fun main() { 
   //sampleStart 
   val array = arrayOf("apples", "oranges", "lime")

assertPrints(array.contentToString(), "[apples, oranges, lime]") 
   //sampleEnd
}
Native
@DeprecatedSinceKotlin(hiddenSince = "1.4")
fun <T> Array<out T>.contentToString(): String
@DeprecatedSinceKotlin(hiddenSince = "1.4")
fun ByteArray.contentToString(): String
@DeprecatedSinceKotlin(hiddenSince = "1.4")
fun ShortArray.contentToString(): String
@DeprecatedSinceKotlin(hiddenSince = "1.4")
fun IntArray.contentToString(): String
@DeprecatedSinceKotlin(hiddenSince = "1.4")
fun LongArray.contentToString(): String
@DeprecatedSinceKotlin(hiddenSince = "1.4")
fun FloatArray.contentToString(): String
@DeprecatedSinceKotlin(hiddenSince = "1.4")
fun DoubleArray.contentToString(): String
@DeprecatedSinceKotlin(hiddenSince = "1.4")
fun BooleanArray.contentToString(): String
@DeprecatedSinceKotlin(hiddenSince = "1.4")
fun CharArray.contentToString(): String

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

Since Kotlin

1.1

Samples

import samples.*
import kotlin.test.*
fun main() { 
   //sampleStart 
   val array = arrayOf("apples", "oranges", "lime")

assertPrints(array.contentToString(), "[apples, oranges, lime]") 
   //sampleEnd
}
@JvmName(name = "contentToStringNullable")
inline fun <T> Array<out T>?.contentToString(): String
@JvmName(name = "contentToStringNullable")
inline fun ByteArray?.contentToString(): String
@JvmName(name = "contentToStringNullable")
inline fun ShortArray?.contentToString(): String
@JvmName(name = "contentToStringNullable")
inline fun IntArray?.contentToString(): String
@JvmName(name = "contentToStringNullable")
inline fun LongArray?.contentToString(): String
@JvmName(name = "contentToStringNullable")
inline fun FloatArray?.contentToString(): String
@JvmName(name = "contentToStringNullable")
inline fun DoubleArray?.contentToString(): String
@JvmName(name = "contentToStringNullable")
inline fun BooleanArray?.contentToString(): String
@JvmName(name = "contentToStringNullable")
inline fun CharArray?.contentToString(): String

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

Since Kotlin

1.4

Samples

import samples.*
import kotlin.test.*
fun main() { 
   //sampleStart 
   val array = arrayOf("apples", "oranges", "lime")

assertPrints(array.contentToString(), "[apples, oranges, lime]") 
   //sampleEnd
}
JS
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.

Since Kotlin

1.4

Samples

import samples.*
import kotlin.test.*
fun main() { 
   //sampleStart 
   val array = arrayOf("apples", "oranges", "lime")

assertPrints(array.contentToString(), "[apples, oranges, lime]") 
   //sampleEnd
}
Native
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.

Since Kotlin

1.4

Samples

import samples.*
import kotlin.test.*
fun main() { 
   //sampleStart 
   val array = arrayOf("apples", "oranges", "lime")

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