Created
September 11, 2016 07:01
-
-
Save danielpowell4/1f0c514a4e9865b31b05524212fb0a58 to your computer and use it in GitHub Desktop.
Replace letters in string with the letter 13 places after it in the alphabet
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
def rot13(string) | |
string.tr("A-Za-z", "N-ZA-Mn-za-m") | |
end | |
# More on tr here: http://apidock.com/ruby/String/tr |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment