Given a string and integer shift
implement a function which shifts each character in that string by shift
amount (cesar cipher) eg. if shift is 1
then a
becomes b
, c
becomesd
, z
became a
etc. Allowed input is string containing only lowercase characters from alphabet abcdefghijklmnopqrstuvwxyz
.
encodeCaesarCipher("abc", 1) // bcd
encodeCaesarCipher("abc", 3) // def
encodeCaesarCipher("xyz", 1) // yza