added LSL2 stored procedures
This commit is contained in:
19
LSL2/STPROC/REMOVE_TRAILING_CHAR.txt
Normal file
19
LSL2/STPROC/REMOVE_TRAILING_CHAR.txt
Normal file
@ -0,0 +1,19 @@
|
||||
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
|
Reference in New Issue
Block a user