func Caesar
ActionCaesar generalizes ROT13 to an arbitrary shift. Negative and large shifts are normalized into [0,26). Only ASCII letters move; anything else passes through unchanged. Caesar(s, 13) is exactly Rot13(s).
Package rot13 ports Go's classic ROT13 example — the one used to teach strings.Map and io.Reader in the standard libr...
Package rot13 ports Go's classic ROT13 example — the one used to teach strings.Map and io.Reader in the standard library docs — to an on-chain Gno realm. The core is a pure letter-rotation cipher over ASCII: ROT13 shifts each letter 13 places, which (since the alphabet has 26 letters) makes ROT13 its own inverse. Caesar generalizes it to any shift.
Everything here is pure strings/unicode logic: no state, no randomness, no clock — Render reads its input straight from the gnoweb path.
Caesar generalizes ROT13 to an arbitrary shift. Negative and large shifts are normalized into [0,26). Only ASCII letters move; anything else passes through unchanged. Caesar(s, 13) is exactly Rot13(s).
Rot13 applies the ROT13 substitution cipher, rotating ASCII letters by 13 and leaving every other byte untouched. Because 13 is half of 26, Rot13(Rot13(s)) == s — the cipher is its own inverse. This mirrors the canonical strings.Map example from the Go docs.