RosettaCodeData/Task/Rot-13/Zkl/rot-13.zkl
2023-07-01 13:44:08 -04:00

8 lines
388 B
Text

#!/home/craigd/Bin/zkl
fcn rot13(text){
text.translate("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",
"nopqrstuvwxyzabcdefghijklmNOPQRSTUVWXYZABCDEFGHIJKLM");
}
text:=(vm.arglist or File.stdin); // command line or pipe
text.pump(File.stdout,rot13); // rotate each word and print it
if(text.isType(List)) File.stdout.writeln(); // command line gets ending newline