Plan 9 from Bell Labs’s /usr/web/sources/contrib/fgb/root/sys/src/cmd/4th/lib/rot13.4th

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


\ Taken from http://en.literateprograms.org/Rot13_(Forth)
\ Optimized for 4tH by J.L. Bezemer, 2007/2008

[UNDEFINED] within [IF]
include lib/range.4th
[THEN]

[UNDEFINED] rot13 [IF]
: rot13                                ( c -- o )
  dup bl or dup [char] a [char] z 1 [+] within
  if [char] m > 13 swap if negate then + else drop then
;
[THEN]

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.