rot13
Returns a string transformed using ROT-13.
Syntax
-
rot13(s)
-
s
is a string
-
Description
If s
is a string, then rot13(s)
returns s
transformed using ROT-13.
Notice that rot13(s) = Caesar(s, 13)
and that rot13
is an involution.
Examples
Alice ≔ ExampleData("Alice in Wonderland")
ALICE’S ADVENTURES IN WONDERLAND Lewis Carroll THE MILLENNIUM FULCRUM EDITION 3.0 CHAPTER I. Down the Rabbit-Hole Alice was beginning to get very tired of sitting by her sister on the bank, and of having nothing to do: once or twice she had peeped into the book her sister was reading, but it had no pictures or conversations in it, ‘and what is the use of a book,’ thought Alice ‘without pictures or conversations?’ So she was considering in her own mind (as well as she could, for the hot day made her feel very sleepy and stupid), whether the pleasure of making a daisy-chain would be worth the trouble of getting up and picking the daisies, when suddenly a White Rabbit with pink eyes ran close by her. There was nothing so VERY remarkable in that; nor did Alice think it so VERY much out of the way to hear the Rabbit say to itself, ‘Oh dear! Oh dear! I shall be late!’ (when she thought it over afterwards, it occurred to her that she ought to have wondered a…
rot13(Alice)
NYVPR’F NQIRAGHERF VA JBAQREYNAQ Yrjvf Pneebyy GUR ZVYYRAAVHZ SHYPEHZ RQVGVBA 3.0 PUNCGRE V. Qbja gur Enoovg-Ubyr Nyvpr jnf ortvaavat gb trg irel gverq bs fvggvat ol ure fvfgre ba gur onax, naq bs univat abguvat gb qb: bapr be gjvpr fur unq crrcrq vagb gur obbx ure fvfgre jnf ernqvat, ohg vg unq ab cvpgherf be pbairefngvbaf va vg, ‘naq jung vf gur hfr bs n obbx,’ gubhtug Nyvpr ‘jvgubhg cvpgherf be pbairefngvbaf?’ Fb fur jnf pbafvqrevat va ure bja zvaq (nf jryy nf fur pbhyq, sbe gur ubg qnl znqr ure srry irel fyrrcl naq fghcvq), jurgure gur cyrnfher bs znxvat n qnvfl-punva jbhyq or jbegu gur gebhoyr bs trggvat hc naq cvpxvat gur qnvfvrf, jura fhqqrayl n Juvgr Enoovg jvgu cvax rlrf ena pybfr ol ure. Gurer jnf abguvat fb IREL erznexnoyr va gung; abe qvq Nyvpr guvax vg fb IREL zhpu bhg bs gur jnl gb urne gur Enoovg fnl gb vgfrys, ‘Bu qrne! Bu qrne! V funyy or yngr!’ (jura fur gubhtug vg bire nsgrejneqf, vg bppheerq gb ure gung fur bhtug gb unir jbaqrerq n…