Functions

rot13

Supported By

Syntax

[the] rot13 of factor

rot13 ( expression )

Factor and expression yield strings.

Description

The rot13 function returns the text passed to it enciphered (or deciphered) with the ROT13 substitution cipher. All a's in the text become n's, b's become o's, c's become p's, and so on and vice versa.

In the following example, the punchline of the joke has been enciphered with ROT13:

How can you tell an extrovert from an introvert at NSA?
Va gur ryringbef, gur rkgebireg ybbxf ng gur BGURE thl'f fubrf.

Applying the ROT13 function to this text enciphers the setup and deciphers the punchline:

Ubj pna lbh gryy na rkgebireg sebz na vagebireg ng AFN?
In the elevators, the extrovert looks at the OTHER guy's shoes.

A further application of the ROT13 function will return the original text.

Note

The ROT13 cipher should never be used for cryptographic purposes.