Rot13
func(s string) stringRot13 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.
- OID
- 01d732…8683:3
Rot13 details
rot13Rune
func(r int32) int32rot13Rune is the mapping function handed to strings.Map — the heart of the classic example.
- OID
- 01d732…8683:5
rot13Rune details
Caesar
func(s string, shift int) stringCaesar 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).
- OID
- 01d732…8683:6
Caesar details
hexNibble
func(b uint8) inthexNibble decodes a single hex digit, returning -1 if invalid.
- OID
- 01d732…8683:7
hexNibble details
percentDecode
func(s string) stringpercentDecode turns "%20"/"+" style path escapes back into readable text so gnoweb links with spaces or punctuation round-trip nicely. Invalid escapes are left verbatim.
- OID
- 01d732…8683:8
percentDecode details
Render
func(path string) stringRender is the gnoweb entry point (not a crossing call). Render("") -> explanation + a worked example Render("/Hello, Gno!") -> the input and its ROT13 Render("/caesar/3/attack") -> a Caesar shift of 3 applied to "attack"
- OID
- 01d732…8683:9
Render details
renderRoot
func() string- OID
- 01d732…8683:10
renderRoot details
renderRot13
func(text string) string- OID
- 01d732…8683:11
renderRot13 details
renderCaesar
func(text string, shift int) string- OID
- 01d732…8683:12