How To Create Random Alphanumeric In Kotlin

[Solved] How To Create Random Alphanumeric In Kotlin | Kotlin - Code Explorer | yomemimo.com
Question : how to create random alphanumeric in kotlin

Answered by : hannan

fun getRandomString(length: Int) : String { val allowedChars = ('A'..'Z') + ('a'..'z') + ('0'..'9') return (1..length) .map { allowedChars.random() } .joinToString("")
}

Source : | Last Update : Sat, 13 Nov 21

Answers related to how to create random alphanumeric in kotlin

Code Explorer Popular Question For Kotlin