Provide additional string conversion methods to match missing java.lang.String constructors.
Fixes KT-5019
This commit is contained in:
@@ -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.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user