Integer.toString(16)


#1

This seems to be missing in Kotlin for Javascript. Any workarounds?


#2

Solution:

fun Int.toString(radix: Int): String {
    val value = this
    @Suppress("UnsafeCastFromDynamic")
    return js(code = "value.toString(radix)")
}
val value = 127
println(value.toString(16))

#3

That sounds to me like a workaround rather than a solution, has this already been raised by someone in YouTrack?