Last active
December 16, 2020 18:13
-
-
Save xrrocha/92ed032f03390258fa0d008f84a2f57f to your computer and use it in GitHub Desktop.
code block for README-18
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Shuffle inner letter array | |
for (i in range) { | |
// Choose a random index in region | |
val rndIdx: Int = range.random() | |
// Swap current/random chars | |
result[rndIdx] = result[i].also { | |
result[i] = result[rndIdx] | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment