StringTrimRight
not ratedRemoves all spaces at the end of string s.
function StringTrimRight takes string s returns string
local integer i = 0
local integer l = -1
local string c
if s == null or s == "" then
return ""
endif
loop
set c = SubString( s, i, i + 1 )
if c == "" then
exitwhen l < 0
return SubString( s, 0, l + 1 )
elseif c != " " then
set l = i
endif
set i = i + 1
endloop
return ""
endfunctionNo comments.