📅  最后修改于: 2022-03-11 14:53:32.475000             🧑  作者: Mango
fun getRandomString(length: Int) : String {
val charset = ('a'..'z') + ('A'..'Z') + ('0'..'9')
return List(length) { charset.random() }
.joinToString("")
}