From d76b6ad63f69e000e6b2ca076d97388422cfa4a6 Mon Sep 17 00:00:00 2001 From: Ilya Gorbunov Date: Mon, 14 Jan 2019 19:38:13 +0300 Subject: [PATCH] Update docs of String(chars, offset, length) --- runtime/src/main/kotlin/kotlin/text/Strings.kt | 3 +++ 1 file changed, 3 insertions(+) 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)