W3cubDocs

/Kotlin

toString

Platform and version requirements: JVM (1.1), JS (1.1), Native (1.1)
fun Byte.toString(radix: Int): String

Returns a string representation of this Byte value in the specified radix.

Exceptions

IllegalArgumentException - when radix is not a valid radix for number to string conversion.

Platform and version requirements: JVM (1.1), JS (1.1), Native (1.1)
fun Short.toString(radix: Int): String

Returns a string representation of this Short value in the specified radix.

Exceptions

IllegalArgumentException - when radix is not a valid radix for number to string conversion.

Platform and version requirements: JVM (1.1), JS (1.1), Native (1.1)
fun Int.toString(radix: Int): String

Returns a string representation of this Int value in the specified radix.

Exceptions

IllegalArgumentException - when radix is not a valid radix for number to string conversion.

Platform and version requirements: JVM (1.1), JS (1.1), Native (1.1)
fun Long.toString(radix: Int): String

Returns a string representation of this Long value in the specified radix.

Exceptions

IllegalArgumentException - when radix is not a valid radix for number to string conversion.

Platform and version requirements: JVM (1.3), JS (1.3), Native (1.3)
@ExperimentalUnsignedTypes fun UByte.toString(
    radix: Int
): String

Returns a string representation of this Byte value in the specified radix.

Exceptions

IllegalArgumentException - when radix is not a valid radix for number to string conversion.

Platform and version requirements: JVM (1.3), JS (1.3), Native (1.3)
@ExperimentalUnsignedTypes fun UShort.toString(
    radix: Int
): String

Returns a string representation of this Short value in the specified radix.

Exceptions

IllegalArgumentException - when radix is not a valid radix for number to string conversion.

Platform and version requirements: JVM (1.3), JS (1.3), Native (1.3)
@ExperimentalUnsignedTypes fun UInt.toString(
    radix: Int
): String

Returns a string representation of this Int value in the specified radix.

Exceptions

IllegalArgumentException - when radix is not a valid radix for number to string conversion.

Platform and version requirements: JVM (1.3), JS (1.3), Native (1.3)
@ExperimentalUnsignedTypes fun ULong.toString(
    radix: Int
): String

Returns a string representation of this Long value in the specified radix.

Exceptions

IllegalArgumentException - when radix is not a valid radix for number to string conversion.

© 2010–2020 JetBrains s.r.o. and Kotlin Programming Language contributors
Licensed under the Apache License, Version 2.0.
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.text/to-string.html