wes d2a2ba9e15 first commit | 4 years ago | |
---|---|---|
.. | ||
README.md | 4 years ago | |
code.cpp | 4 years ago | |
unitTest.cpp | 4 years ago |
by Matt tags: strings, conditions
A spoonerism is when the first letters / sounds of two words are transposed onto one another. Create a function that takes a two-word string and performs a spoonerism on the phrase. Examples spoonerise("history lecture") ➞ "listory hecture" spoonerise("loud noises") ➞ "noud loises" spoonerise("chow mein") ➞ "mow chein" spoonerise("edabit rules!") ➞ "redabi
A spoonerism is when the first letters / sounds of two words are transposed onto one another. Create a function that takes a two-word string and performs a spoonerism on the phrase.
spoonerise("history lecture") ➞ "listory hecture"
spoonerise("loud noises") ➞ "noud loises"
spoonerise("chow mein") ➞ "mow chein"
spoonerise("edabit rules!") ➞ "redabit ules!"