ez.no / exponential / documentation / reference / template operators / strings / rot13
$input_string|rot13()
rotated version of input string.
This operator performs the ROT13 encoding on the input and returns the resulting string. The ROT13 encoding simply shifts every letter by 13 places in the alphabet while leaving non-alpha characters untouched. Encoding and decoding are done by the same operator, passing an encoded string as argument should return the original version.
Example 1
{"Hello World"|rot13}
returns the string "Uryyb Jbeyq".
Example 2
{"Uryyb Jbeyq"|rot13}
returns the string "Hello world".
Comments