function DebugIdInteger2IdString takes integer value returns string
local string charMap="..................................!.#$&'()*+,-./0123456789:;<=>.@ABCDEFGHIJKLMNOPQRSTUVWXYZ[.]^_`abcdefghijklmnopqrstuvwxyz{|}~................................................................................................................................"
local string result=""
local integer remainingValue=value
local integer charValue
local integer byteno
set byteno=0
loop
set charValue=ModuloInteger(remainingValue,256)
set remainingValue=remainingValue/ 256
set result=SubString(charMap,charValue,charValue+1)+result
set byteno=byteno+1
exitwhen byteno==4
endloop
return result
endfunction
ModuloInteger()应该是取余的吧
SubString()这个怎么用,后面的两个参数怎么使用?? |