Rot-13: Difference between revisions

m
m (→‎{{header|Sidef}}: updated code)
Line 5,845:
<syntaxhighlight lang="ruby"># 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| printsay rot13(line) }</syntaxhighlight>
 
=={{header|Simula}}==
<syntaxhighlight lang="simula"> TEXT PROCEDURE ROT13(INP); TEXT INP;
2,747

edits