RosettaCodeData/Task/Rot-13/Phix/rot-13.phix
2016-12-05 23:44:36 +01:00

11 lines
246 B
Text

function rot13(string s)
integer ch
for i=1 to length(s) do
ch = upper(s[i])
if ch>='A' and ch<='Z' then
s[i] += iff(ch<='M',+13,-13)
end if
end for
return s
end function
?rot13("abjurer NOWHERE.")