.

Tuesday, March 13, 2012

[Ruby] ROT13

          Hello, Reader ^^! Back again with source code. This time is a simple ROT13. This one is a bit tricky but still easy. Playing with ASCII index is needed. To check whether a character is an alphabet, simple use the regular expression /[A-Z]/ for uppercase and /[a-z]/ for regular case. After that, switch the index by 13, then you will get the ROT13 result. Okay, that's all I can say. Thank you for reading ^^!








No comments:

Post a Comment