String
fun String(
chars: CharArray,
offset: Int,
length: Int
): StringConverts 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.
Converts the data from the specified array of bytes to characters using the specified character set and returns the conversion result as a string.
fun String(
bytes: ByteArray,
offset: Int,
length: Int
): Stringfun String(bytes: ByteArray): StringConverts the data from the specified array of bytes to characters using the UTF-8 character set and returns the conversion result as a string.
fun String(
codePoints: IntArray,
offset: Int,
length: Int
): StringConverts the code points from a portion of the specified Unicode code point array to a string.
fun String(stringBuffer: StringBuffer): StringConverts the contents of the specified StringBuffer to a string.
fun String(stringBuilder: StringBuilder): StringConverts the contents of the specified StringBuilder to a string.