function ord(%c)
{
%asciimap = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMN" @
"OPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~";
%ascii = strPos(%asciimap,%c) + 32;
return %ascii;
}
function chr(%c)
{
%asciimap = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMN" @
"OPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~";
%char = getSubStr(%asciimap,%c-32,1);
return %char;
}
ord("a"); returns 97, the number value of "a"
chr(98); returns "b", the character value of 98
It might already be out there, but whatever