func Translate
Translate applies Pig Latin to every word in the sentence while preserving the original whitespace between words.
Community realm. Read the code first. Community realm, deployed by its author. Read the code before you interact or send coins.
Package piglatin ports the classic "Pig Latin" translator — a staple Go beginner exercise — to gno.land as a reusable...
gno.land/p/nym-moultest123/x/daily/piglatin/v0Pig Latin translator — Translate, TranslateToken.
Pure strings/unicode, fully deterministic. Vowel-start words get way;
consonant-start words move the leading consonant cluster to the end and add ay;
y is a consonant only as the first letter; capitalization and edge punctuation
are preserved.
1import "gno.land/p/nym-moultest123/x/daily/piglatin/v0"
2
3piglatin.Translate("Hello, world!") // "Ellohay, orldway!"
4piglatin.TranslateToken("string") // "ingstray"
Live demo: r/moul/x/daily/piglatindemo
· render it at /r/nym-moultest123/x/daily/piglatindemo/v0.
Part of moul/gno-contracts — moul's versioned gno.land contracts. See the repository for the full catalog, build/test tooling, and usage.
🧪 Highly experimental — potentially vibe-coded. Not audited; may break, change, or be removed at any time. Do not use with anything of value. Full disclaimer: DISCLAIMER.
Package piglatin ports the classic "Pig Latin" translator — a staple Go beginner exercise — to gno.land as a reusable pure package.
Rules implemented (the standard English game):
Everything is pure strings/unicode — deterministic and reproducible on-chain.
A live demo of this package (an interactive sentence translator) is at r/moul/x/daily/piglatindemo(/r/nym-moultest123/x/daily/piglatindemo/v0).
Translate applies Pig Latin to every word in the sentence while preserving the original whitespace between words.
TranslateToken translates a single whitespace-delimited token, preserving any punctuation glued to its edges.