Search Apps Documentation Source Content File Folder Download Copy Actions Download State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

/p/moul/x/daily/rot13/v0

Directory · 3 Files
README.md Open

gno.land/p/moul/x/daily/rot13/v0

ROT13 / Caesar letter-rotation cipherRot13, Caesar.

Pure strings.Map logic over ASCII letters; everything else passes through untouched. ROT13 shifts each letter 13 places and, since the alphabet has 26 letters, is its own inverse. Caesar generalizes it to any shift (negative and large shifts normalized into [0,26)). Ports Go's classic ROT13 teaching example.

1import "gno.land/p/moul/x/daily/rot13/v0"
2
3s := rot13.Rot13("Hello, Gno!") // "Uryyb, Tab!"
4d := rot13.Rot13(s)             // "Hello, Gno!" (own inverse)
5c := rot13.Caesar("attack", 3)  // "dwwdfn"

Live demo: r/moul/x/daily/rot13demo · render it at /r/moul/x/daily/rot13demo/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.