Translate text to pig latin

Translate text to Pig Latin

Write a method that will take a text and convert it to Pig Latin. The rules for Pig Latin are, for each word, you move the first letter to the end of the word and add “ay” after it.

Example 1:


input data:
book
output:
ookbay

Example 2:


input data:
garage
output:
aragegay
View Code Template
View Java Solution

Seda
Seda Kunda is a web designer and developer with a degree in Computer Science and a great passion for code. Besides code, she enjoys pepperoni pizza, watching the bachelor and sleeping in on Saturdays.
Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedIn