PathrockNetwork Gno Explorer
HomeBlocksTransactionsTokensRealmsPackagesValidatorsAnalytics

PathrockNetwork Gno Explorer — an independent explorer for Gno.land Mainnet (gnoland-1), operated by PathrockNetwork. Not an official Gno.land service.

gnowebarchive RPC

gno.land/r/moul/x/daily/rot13demo/v0

Realm
Open in gnoweb ↗

Overview

Kind
Realm (renderable)
Name
v0
Namespace
moul / x / daily / rot13demo
Files
3 (README)(gnomod.toml)
Exported functions
1
Module
gno.land/r/moul/x/daily/rot13demo/v0
gno
0.9

Files (3)

  • README.mdmarkdown
  • gnomod.tomltoml
  • rot13demo.gnogno

Select a file to view its exact on-chain source. Sorted README → gnomod → sources → tests.

Functions

  • Render(path string) string

Signatures reconstructed verbatim from vm/qfuncs — interface params keep their inline definitions.

Rendered

RenderedRawgnoweb ↗
# ROT13

Demo of the [`p/moul/x/daily/rot13`](/p/moul/x/daily/rot13/v0) library — an on-chain port of Go's classic **ROT13** cipher, the standard-library `strings.Map` / `io.Reader` teaching example. Each ASCII letter is rotated 13 places through the alphabet; everything else is left alone.

Because the alphabet has 26 letters and 13 is exactly half, **ROT13 is its own inverse** — encoding twice returns the original text.

## Example

| stage | text |
|---|---|
| input | `Hello, Gno!` |
| ROT13 | `Uryyb, Tab!` |
| ROT13 again | `Hello, Gno!` |

## Try it

- `Render("/Uryyb, Tab!")` — decode any text (append it to the path).
- `Render("/caesar/3/attack at dawn")` — a general Caesar shift.

Or call the library functions directly:

```go
rot13.Rot13("Hello, Gno!")     // "Uryyb, Tab!"
rot13.Caesar("attack", 3)      // "dwwdfn"
rot13.Caesar("Hello", 13)      // same as Rot13: "Uryyb"
```

vm/qrender output, sanitized (docs/render-security.md) and displayed in an empty-sandbox iframe — scripts, forms and popups cannot run. Links stay inert in-preview; right-click to open.