W3cubDocs

/Kotlin

String

inline fun String(
    bytes: ByteArray, 
    offset: Int, 
    length: Int, 
    charset: Charset
): String

Platform and version requirements: JVM

Converts the data from a portion of the specified array of bytes to characters using the specified character set and returns the conversion result as a string.

Parameters

bytes - the source array for the conversion.

offset - the offset in the array of the data to be converted.

length - the number of bytes to be converted.

charset - the character set to use.

inline fun String(bytes: ByteArray, charset: Charset): String

Platform and version requirements: JVM

Converts the data from the specified array of bytes to characters using the specified character set and returns the conversion result as a string.

inline fun String(
    bytes: ByteArray, 
    offset: Int, 
    length: Int
): String

Platform and version requirements: JVM

Converts the data from a portion of the specified array of bytes to characters using the UTF-8 character set and returns the conversion result as a string.

Parameters

bytes - the source array for the conversion.

offset - the offset in the array of the data to be converted.

length - the number of bytes to be converted.

inline fun String(bytes: ByteArray): String

Platform and version requirements: JVM

Converts the data from the specified array of bytes to characters using the UTF-8 character set and returns the conversion result as a string.

inline fun String(chars: CharArray): String

Platform and version requirements: JVM

Converts the characters in the specified array to a string.

inline fun String(
    chars: CharArray, 
    offset: Int, 
    length: Int
): String

Platform and version requirements: JVM

Converts the characters from a portion of the specified array to a string.

inline fun String(
    codePoints: IntArray, 
    offset: Int, 
    length: Int
): String

Platform and version requirements: JVM

Converts the code points from a portion of the specified Unicode code point array to a string.

inline fun String(stringBuffer: StringBuffer): String

Platform and version requirements: JVM

Converts the contents of the specified StringBuffer to a string.

inline fun String(stringBuilder: StringBuilder): String

Platform and version requirements: JVM

Converts the contents of the specified StringBuilder to a string.

© 2010–2017 JetBrains s.r.o.
Licensed under the Apache License, Version 2.0.
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.text/-string.html