Provide additional string conversion methods to match missing java.lang.String constructors.

Fixes KT-5019
This commit is contained in:
Ilya Gorbunov
2015-03-17 23:02:04 +03:00
parent 843298883f
commit 0580039ded
@@ -187,6 +187,16 @@ public fun String(bytes: ByteArray): String = java.lang.String(bytes, Charsets.U
*/
public fun String(chars: CharArray): String = java.lang.String(chars) as String
/**
* Converts the characters from a portion of the specified array to a string.
*/
public fun String(chars: CharArray, offset: Int, length: Int): String = java.lang.String(chars, offset, length) as String
/**
* Converts the code points from a portion of the specified Unicode code point array to a string.
*/
public fun String(codePoints: IntArray, offset: Int, length: Int): String = java.lang.String(codePoints, offset, length) as String
/**
* Converts the contents of the specified StringBuffer to a string.
*/