Given a string that contains lowercase letters, encode that string with the alphabet cipher.
To encode with the alphabet cipher (I will be using the example hello):
- First, convert each letter in the string to a number depending on its position in the alphabet (
a=1,b=2, etc.)85121215 - Pad each number to two characters with
0s.0805121215 - Join.
0805121215
Test cases
helloworld -> 08051212152315181204 codegolf -> 0315040507151206 alphabetcipher -> 0112160801020520030916080518 johncena -> 1015081403051401 Remember, this is code-golf, so the code with the fewest number of bytes wins.