- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for rot13 (0.02 sec)
-
src/bytes/example_test.go
// Output: // 8 // 9 // -1 } func ExampleMap() { rot13 := func(r rune) rune { switch { case r >= 'A' && r <= 'Z': return 'A' + (r-'A'+13)%26 case r >= 'a' && r <= 'z': return 'a' + (r-'a'+13)%26 } return r } fmt.Printf("%s\n", bytes.Map(rot13, []byte("'Twas brillig and the slithy gopher..."))) // Output: // 'Gjnf oevyyvt naq gur fyvgul tbcure...
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Wed Aug 07 17:22:36 UTC 2024 - 14.9K bytes - Viewed (0) -
src/bytes/bytes_test.go
} // 3. Rot13 m = Map(rot13, []byte("a to zed")) expect = "n gb mrq" if string(m) != expect { t.Errorf("rot13: expected %q got %q", expect, m) } // 4. Rot13^2 m = Map(rot13, Map(rot13, []byte("a to zed"))) expect = "a to zed" if string(m) != expect { t.Errorf("rot13: expected %q got %q", expect, m) } // 5. Drop
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Mon Aug 19 19:09:04 UTC 2024 - 61.2K bytes - Viewed (0) -
src/bufio/bufio_test.go
if s := readBytes(b); s != "hello world" { t.Errorf("simple hello world test failed: got %q", s) } b = NewReader(newRot13Reader(strings.NewReader(data))) if s := readBytes(b); s != "uryyb jbeyq" { t.Errorf("rot13 hello world test failed: got %q", s) } } type readMaker struct { name string fn func(io.Reader) io.Reader } var readMakers = []readMaker{ {"full", func(r io.Reader) io.Reader { return r }},
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Fri Nov 01 21:52:12 UTC 2024 - 51.6K bytes - Viewed (0)