This question already has an answer here:
- DVORAK Keyboard layout 5 answers
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
a -> z, b -> y, etc.) then the encoded text would be
Svool dliow, nb mznv rh Lorevi! R orpv xlwv tlou!.
Your task is to encode the simple substitution cipher. Given a string of decoded text and a key, output the encoded text.
Remember, this is code-golf, so the code with the fewest number of bytes wins.