Rot13 ( )

Function stats

Average user rating
34
175
9999
Support
FileMaker 10.0 +
Date posted
07 January 2009
Last updated
07 January 2009
Version
Recursive function
Yes

Author Info
 The Shadow

22 functions

Average Rating 4.3

author_avatar



 

Function overview

Prototype

Rot13  ( Text )


Parameters

Text  The text to convert.


Description

Notice that Rot-13 is not even a trivial form of encryption, its for hiding the punch-line of a joke at first glance.

This is for FileMaker 10+, as it uses the new Char() and Code() functions.

Examples

Sample input

Rot13( "How can you tell an extrovert from an introvert at NSA?

Va gur ryringbef, gur rkgebireg ybbxf ng gur BGURE thl'f fubrf. " )


Sample output

Ubj pna lbh gryy na rkgebireg sebz na vagebireg ng AFN?

In the elevators, the extrovert looks at the OTHER guy's shoes.

 

Function code

If (IsEmpty(text); text;
Let( [charCode = Code(Left(text;1));
rest = Right(text; Length(text)-1 );
rotated = Case( charCode >= 65 and charCode <= 90; Char( 65+ Mod((charCode-65)+13;26) );
charCode >= 97 and charCode <= 122; Char( 97+ Mod((charCode-97)+13;26) );
Char( charCode )
)
];
rotated & Rot13(rest)
))

// ===================================
/*

    This function is published on FileMaker Custom Functions
    to check for updates and provide feedback and bug reports
    please visit http://www.fmfunctions.com/fid/175

    Prototype: Rot13( Text )
    Function Author: The Shadow (http://www.fmfunctions.com/mid/34)
    Last updated: 07 January 2009
    Version: 1.1

*/
// ===================================

 

 

 

 

 

 

 

Top Tags

Text Parsing  (33)
List  (32)
Date  (28)
XML  (26)
Format  (23)
Sql  (22)
Dev  (20)
Debug  (17)
Interface  (15)
Layout  (15)
Text  (14)
Variables  (12)
Layout Objects  (11)
Filter  (11)
Design  (10)
Array  (8)