wes d2a2ba9e15 first commit | 4 tahun lalu | |
---|---|---|
.. | ||
README.md | 4 tahun lalu | |
code.cpp | 4 tahun lalu | |
unitTest.cpp | 4 tahun lalu |
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!"