This question already has an answer here:
- Spoonerise words 36 answers
A spoonerisation is swapping the first letter/pronounceable syllable of two or more words.
Example: A lack of pies = A pack of lies. Bad salad = Sad ballad (ish) :)
Challenge: Write a program to spoonerise two words in the shortest characters possible.
- If the first letter is a consonant, you must include subsequent letters until you reach a vowel. (e.g. 'thanks' - the th gets removed and put on the front of the other word).
- With words that start with vowels, do not remove anything from the start of the word.
Good luck :)
UPDATE: Multiple word spoonerisms are not strictly applicable, however from a programatic view we must cater for them so this is the rule: Every word must change. Example:
Weird Keen Monkey -> Meird Ween Konkey OR Keird Meen Wonkey NOT Meird Keen Wonkey
Also 'y' is treated as a vowel (just to simplify things a bit)