W3cubDocs

/Kotlin

concatToString

Platform and version requirements: JVM (1.3), JS (1.3), Native (1.3)
fun CharArray.concatToString(): String

Concatenates characters in this CharArray into a String.

Platform and version requirements: JVM (1.4), JS (1.4)
fun CharArray.concatToString(
    startIndex: Int = 0, 
    endIndex: Int = this.size
): String
Platform and version requirements: Native (1.3)
fun CharArray.concatToString(
    startIndex: Int, 
    endIndex: Int
): String

Concatenates characters in this CharArray or its subrange into a String.

Parameters

startIndex - the beginning (inclusive) of the subrange of characters, 0 by default.

endIndex - the end (exclusive) of the subrange of characters, size of this array by default.

Exceptions

IndexOutOfBoundsException - if startIndex is less than zero or endIndex is greater than the size of this array.

IllegalArgumentException - if startIndex is greater than endIndex.

© 2010–2020 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.text/concat-to-string.html