rendered paste bodyfunction Encryption takes string input returns string
local integer inputStringLength = StringLength( input )
local integer inputLoop = 0
local integer alphabetLoop = 0
local string inputLoopChar = ""
local string output = ""
local integer array i
local string array s
loop
exitwhen inputLoop >= inputStringLength
set inputLoopChar = SubString( input, inputLoop, inputLoop + 1 )
loop
exitwhen alphabetLoop >= StringLength( Alphabet() )
if inputLoopChar == SubString( Alphabet(), alphabetLoop, alphabetLoop + 1 ) then
if alphabetLoop < 10 then
set output = output + "0" + I2S( alphabetLoop )
else
set output = output + I2S( alphabetLoop )
endif
endif
set alphabetLoop = alphabetLoop + 1
endloop
set inputLoop = inputLoop + 1
set alphabetLoop = 0
endloop
return output
endfunction