RosettaCodeData/Task/Rot-13/Phix/rot-13.phix

12 lines
246 B
Plaintext

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.")