6 lines
168 B
Forth
6 lines
168 B
Forth
|
|
: encryptRot13(c)
|
||
|
|
c dup isLetter ifFalse: [ return ]
|
||
|
|
isUpper ifTrue: [ 'A' ] else: [ 'a' ] c 13 + over - 26 mod + ;
|
||
|
|
|
||
|
|
: rot13 map(#encryptRot13) charsAsString ;
|