Skip to content

Files

Latest commit

93a923d · Nov 25, 2017

History

History
This branch is 38 commits behind domcode/kataday:master.

Pig_Latin

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Nov 25, 2017

Taking all the consonants before the first vowel of a word and moving them to the back of the word followed by the letters "ay".

hello => ellohay
creating => eatingcray

If the first letter of the word is a vowel, the string is left the same and the letters "way" are appended to the end.

algorithm => algorithmway

Watch out, casing of the word should remain the same:

Hello World => Ellohay Orldway
Hello world => Ellohay orldway

Same is true for punctuation:

Pizza? Yes please! => Izzapay? Esyay easeplay!

Original source: https://www.codewars.com/kata/advanced-pig-latin