RosettaCodeData/Task/Rot-13/Forth/rot-13-1.fth
2023-07-01 13:44:08 -04:00

5 lines
167 B
Forth

: r13 ( c -- o )
dup 32 or \ tolower
dup [char] a [char] z 1+ within if
[char] m > if -13 else 13 then +
else drop then ;