Avoid hitting max argument limit in String(chars)
Rewrite CharArray to String conversions to appending chars one by one. Refine parameter checking in String(chars, offset, length) to adhere to the common exception contract and document it. #KT-29003
This commit is contained in:
@@ -272,6 +272,9 @@ public actual inline fun String(chars: CharArray): String =
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
@kotlin.internal.InlineOnly
|
||||
public actual inline fun String(chars: CharArray, offset: Int, length: Int): String =
|
||||
|
||||
Reference in New Issue
Block a user