Created
December 28, 2014 21:59
-
-
Save ermand/637d15dd01adbe70cb71 to your computer and use it in GitHub Desktop.
Shuffle String in Ruby
This file contains hidden or 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
def shuffle_string(string) | |
string.split('').shuffle.join | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment