Replace every character by character that is N positions down the alphabet of the String

Given a string ‘s’ and a number ‘n’, write a function that returns a string with each character in s replaced with another character that is ‘n’ positions down the alphabet.
For example:

  • If n is 1, A is replaced with B, B is replaced with C and so on.
  • If n is 2, A is replaced with C, B is replaced with D and so on.
  • If n is 3, X is replaced with A, Y is replaced with B and so on.
(more…)
Replace every character by character that is N positions down the alphabet of the String Read More