title: Idiomatic way to generate a random alphanumeric string in Kotlin
body: <p>I can generate a random sequence of numbers in a certain range like the following:</p>
  
  <pre><code>fun ClosedRange&lt;Int&gt;.random() = Random().nextInt(endInclusive - start) +  start
  fun generateRandomNumberList(len: Int, low: Int = 0, high: Int = 255): List&lt;Int&gt; {
    (0..len-1).map {
      (low..high).random()
    }.toList()
  }
  </code></pre>
  
  <p>Then I'll have to extend <code>List</code> with:</p>
  
  <pre><code>fun List&lt;Char&gt;.random() = this[Random().nextInt(this.size)]
  </code></pre>
  
  <p>Then I can do:</p>
  
  <pre><code>fun generateRandomString(len: Int = 15): String{
    val alphanumerics = CharArray(26) { it -&gt; (it + 97).toChar() }.toSet()
        .union(CharArray(9) { it -&gt; (it + 48).toChar() }.toSet())
    return (0..len-1).map {
        alphanumerics.toList().random()
    }.joinToString("")
  }
  </code></pre>
  
  <p>But maybe there's a better way?</p>