September 2017 Update
This commit is contained in:
parent
bba7bfd280
commit
ba8067c3b7
14570 changed files with 153136 additions and 63871 deletions
7
Task/Caesar-cipher/Zkl/caesar-cipher-1.zkl
Normal file
7
Task/Caesar-cipher/Zkl/caesar-cipher-1.zkl
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
fcn caesarCodec(str,n,encode=True){
|
||||
var [const] letters=["a".."z"].chain(["A".."Z"]).pump(String); // static
|
||||
if(not encode) n=26 - n;
|
||||
m,sz := n + 26, 26 - n;
|
||||
ltrs:=String(letters[n,sz],letters[0,n],letters[m,sz],letters[26,n]);
|
||||
str.translate(letters,ltrs)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue