diff --git a/runtime/src/main/kotlin/kotlin/text/Strings.kt b/runtime/src/main/kotlin/kotlin/text/Strings.kt index 89987a79431..15a41f4f040 100644 --- a/runtime/src/main/kotlin/kotlin/text/Strings.kt +++ b/runtime/src/main/kotlin/kotlin/text/Strings.kt @@ -44,3 +44,14 @@ public actual fun CharSequence.repeat(n: Int): String { } } } + +/** + * Converts the characters in the specified array to a string. + */ +// external fun fromCharArray(array: CharArray, start: Int, size: Int) : String +public actual fun String(chars: CharArray): String = fromCharArray(chars, 0, chars.size) + +/** + * Converts the characters from a portion of the specified array to a string. + */ +public actual fun String(chars: CharArray, offset: Int, length: Int): String = fromCharArray(chars, offset, length)