rot13

Summary

Performs a rot13 transform on a string.

Usage

$input_string|rot13(  )

Returns

rotated version of input string.

Description

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.

Examples

Example 1

{"Hello World"|rot13}

returns the string "Uryyb Jbeyq".

Example 2

{"Uryyb Jbeyq"|rot13}

returns the string "Hello world".

Comments

Contents

Reference

Database diagram
Template operators
    PDF
    Arrays
    Data extraction
    Formatting
    Images
    Logic
    Mathematics
    Miscellaneous
    Strings
       mimetype_icon
       append
       begins_with
       break
       ord
       compare
       concat
       contains
       count_chars
       count_words
       crc32
       downcase
       ends_with
       explode
       extract
       extract left
       extract_right
       indent
       insert
       md5
       nl2br
       chr
       pad
       prepend
       remove
       repeat
       reverse
       rot13
       shorten
       simplify
       trim
       upcase
       upfirst
       upword
       wash
       wordtoimage
       wrap
    URLs
    Variables
Template functions
Data fetching
Modules
XML tags


Created

05/02/2004
11:59:37 am
by Balazs Halasy

Last updated

10/02/2004
1:11:35 pm
by Balazs Halasy

Authors

Balazs Halasy



This page is part of the Exponential documentation. The documentation is available under the GNU Free Documentation License. All contributions will be released under the terms of this license.