:love_letter: Kotlin, I am in love with how you al...
# announcements
j
💌 Kotlin, I am in love with how you allow me to write clean code
Copy code
// Generate a Random String
 private fun generateRandomString(length:Int) : String =
     sequence { random.nextInt(128) }
    .map(Int::toChar)
    .filter {
        it in '0'..'9' || it in 'a'..'z' || it in 'A'..'Z'
    }   
    .take(length)
    .joinToString( separator = "" )
Run it: http://try.kotlinlang.org/#/UserProjects/vukejojf8vkf0g2juk40nin9hr/o8dlid605r99vb6i79ojut8c6e
👍 1