[REBOL] Re: pleac
From: joel:neely:fedex at: 12-Oct-2003 7:36
Hi, Carl,
How about a slightly more REBOL-intensive variation?
Carl Read wrote:
> Going by most of the examples I've checked on the site it seems they'd
> like characters to be printed one at a time, so here's a modified
> version of the script I just posted...
>
> rebol []
>
> foreach char input [
> letter: to-string char
> if all [letter >= "a" letter <= "z"][
> char: char + either letter < "n" [13][-13]
> ]
> prin char
> ]
> prin "^/"
>
rot13: func [s [string!]] [
foreach char s [
prin any [
select/case "anabobcpcdqderefsfgtghuhivijwjkxklylmzm" char
select/case "AZABOBCPCDQDEREFSFGTGHUHIVIJWJKXKLYLMZM" char
char
]
]
prin newline
]