open-insight/LSL2/STPROC/REMOVE_TRAILING_CHAR.txt
Infineon\StieberD 7762b129af pre cutover push
2024-09-04 20:33:41 -07:00

20 lines
354 B
Plaintext

FUNCTION REMOVE_TRAILING_CHAR( Field, CharToRemove )
*
begin condition
pre:
post:
end condition
$insert logical
NewField = ''
FCnt = len(Field)
Done = false$
for i = FCnt to 1 step -1
ThisChar = Field[i,1]
if ThisChar = CharToRemove then
NewField = Field[1,i-1]
end
until ThisChar <> CharToRemove
next i
return NewField