# Encode the simple substitution cipher [duplicate]

Review

First, let's review the Simple Substitution Cipher.

To encode a string in the Simple Substitution Cipher, replace each letter in your string with another letter.

A letter may not be used to replace more than one existing letter.

For example, if I was encoding the text Hello world, my name is Oliver! I like code golf! with the key zyxwvutsrqponmlkjihgfedcba (a -> z, b -> y, etc.) then the encoded text would be Svool dliow, nb mznv rh Lorevi! R orpv xlwv tlou!.

• This is essentially "Implement UNIX tr", and just parameterises an existing tr question. Nov 2 '16 at 17:12