Generador de cadenas aleatorio Kotlin
private fun randomID(): String = List(16) {
(('a'..'z') + ('A'..'Z') + ('0'..'9')).random()
}.joinToString("")
Expensive Eel
private fun randomID(): String = List(16) {
(('a'..'z') + ('A'..'Z') + ('0'..'9')).random()
}.joinToString("")
fun getRandomString(length: Int) : String {
val charset = ('a'..'z') + ('A'..'Z') + ('0'..'9')
return List(length) { charset.random() }
.joinToString("")
}