HEX
Server: Apache
System: Linux iad1-shared-e1-13 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64
User: dh_x7ke6i (5503775)
PHP: 7.4.33
Disabled: NONE
Upload Files
File: //usr/share/jed/lib/rot13.sl
%%
%%  rot13.sl---- rotates text by 13 characters
%%
define rot13 ()
{
   variable i, j;

   check_region (1);		       %  spot pushed

   variable a = String_Type[256];
   _for ('A', 'M', 1)
     {
	i = ();
	a[i] = char (i + 13);
	% Now take care of lower case ones
	i = i | 0x20;
	a[i] = char (i + 13);
     }

   _for ('N', 'Z', 1)
     {
	i = ();
	a[i] = char (i - 13);
	% Now take care of lower case ones
	i = i | 0x20;
	a[i] = char (i - 13);
     }
   translate_region (a);
   pop_spot ();
}