RosettaCodeData/Task/Rot-13/Sidef/rot-13.sidef
2023-12-16 21:33:55 -08:00

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) }