Skip to content

Instantly share code, notes, and snippets.

@mahata
Last active June 5, 2021 20:38
Show Gist options
  • Save mahata/4145905 to your computer and use it in GitHub Desktop.
Save mahata/4145905 to your computer and use it in GitHub Desktop.
random ascii string generator in Scala
object randomSample {
def randomString(length: Int) = Stream.continually(util.Random.nextPrintableChar) take length mkString
}
println(randomSample.randomString(64))
@vpipkt
Copy link

vpipkt commented Oct 26, 2016

gratzie

@piggybox
Copy link

Nice

@liu-peiwen
Copy link

nice

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment