Skip to content

Instantly share code, notes, and snippets.

@loganmzz
Created June 28, 2018 15:52
Show Gist options
  • Save loganmzz/1afd55ee6dd112fdbb907d960ab6b2d5 to your computer and use it in GitHub Desktop.
Save loganmzz/1afd55ee6dd112fdbb907d960ab6b2d5 to your computer and use it in GitHub Desktop.
def chars = [
'a'..'z', '0'..'9',
// 'àâäéèêëìîïòôöùûüÿçñ',
'@#&!=+$£€*?,;.:-_(){}[]'
]
def printChars(list) {
println(list.join().replaceAll(/[\[\]-]/, /\\$0/))
}
def list = chars.collect { it -> it.toList() }.flatten()
printChars(list)
Collections.shuffle(list)
printChars(list)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment