7 lines
172 B
Text
7 lines
172 B
Text
# Returns a copy of 's' with rot13 encoding.
|
|
func rot13(s) {
|
|
s.tr('A-Za-z', 'N-ZA-Mn-za-m')
|
|
}
|
|
|
|
# Perform rot13 on standard input.
|
|
STDIN.each { |line| say rot13(line) }
|