Write some code that translates a string (word, sentence, or paragraph) into “pig-latin” using the following rules.
- Words that start with a consonant have their first letter moved to the end of the word and the letters “ay” added to the end.
- Words that start with a vowel have the letters “way” added to the end.
- Words that end in “way” are not modified.
- Punctuation must remain in the same relative place from the end of the word.
- Hyphens are treated as two words
- Capitalization must remain in the same place.
- Single letters are not modified.
"HeLLo World! I can't wait to explore your VAST forests. The-End!"
"ElLOhay Orldway! I antca'y aitway otay exploreway ouryay ASTVay orestfay. Hetay-Endway!"