RosettaCodeData/Task/Rot-13/LiveCode/rot-13.livecode
2023-07-01 13:44:08 -04:00

8 lines
295 B
Text

function rot13 S
repeat with i = 1 to length(S)
get chartonum(char i of S)
if it < 65 or it > 122 or (it > 90 and it < 97) then next repeat
put char it - 64 of "NOPQRSTUVWXYZABCDEFGHIJKLM nopqrstuvwxyzabcdefghijklm" into char i of S
end repeat
return S
end rot13