diff --git a/runtime/src/main/kotlin/kotlin/text/Strings.kt b/runtime/src/main/kotlin/kotlin/text/Strings.kt index 906d05d5977..a962c14d317 100644 --- a/runtime/src/main/kotlin/kotlin/text/Strings.kt +++ b/runtime/src/main/kotlin/kotlin/text/Strings.kt @@ -222,6 +222,9 @@ public actual fun String(chars: CharArray): String = fromCharArray(chars, 0, cha /** * Converts the characters from a portion of the specified array to a string. + * + * @throws IndexOutOfBoundsException if either [offset] or [length] are less than zero + * or `offset + length` is out of [chars] array bounds. */ public actual fun String(chars: CharArray, offset: Int, length: Int): String = fromCharArray(chars, offset, length)