Package piglatin ports the classic "Pig Latin" translator — a staple Go beginner exercise — to an on-chain gno.land realm.
Rules implemented (the standard English game):
- A word that starts with a vowel gets "way" appended: "apple" -> "appleway"
- A word that starts with one or more consonants has that leading consonant cluster moved to the end, followed by "ay": "string" -> "ingstray"
- "y" acts as a consonant only when it is the first letter of the word ("yellow" -> "ellowyay"); elsewhere it counts as a vowel ("myth" -> "ythmay").
- Original capitalization of the word is preserved (title-case in, title-case out): "Hello" -> "Ellohay".
- Trailing/leading punctuation attached to a word is preserved in place: "Hello," -> "Ellohay,".
Everything is pure strings/unicode — deterministic and reproducible on-chain.