Mangle the String

Published by Pickle in

Create a function that takes a string and replaces every letter with the letter following it in the alphabet ("c" becomes "d", "z" becomes "a", "b" becomes "c", etc). Then capitalize every vowel (a, e, i, o, u) and return the new modified string.

Examples

Mangle("Fun times!") ➞ "GvO Ujnft!"

Mangle("The quick brown fox.") ➞ "UIf rvjdl cspxO gpy."

Mangle("Omega") ➞ "Pnfhb"

Notes

  • If a letter is already uppercase, return it as uppercase (regardless of being a vowel).
  • "y" is not considered a vowel.
Watch a quick demo on how Edabit works.