RosettaCodeData/Task/Rot-13/Oz/rot-13.oz
Ingy döt Net b83f433714 tasks a-s
2013-04-10 23:57:08 -07:00

14 lines
340 B
Text

declare
fun {RotChar C}
if C >= &A andthen C =< &Z then &A + (C - &A + 13) mod 26
elseif C >= &a andthen C =< &z then &a + (C - &a + 13) mod 26
else C
end
end
fun {Rot13 S}
{Map S RotChar}
end
in
{System.showInfo {Rot13 "NOWHERE Abjurer 42"}}
{System.showInfo {Rot13 {Rot13 "NOWHERE Abjurer 42"}}}