'preamble Const sT$=Chr$(9), sS$=" " Function LTrim$(a$) Local Integer m For m=1 To Len(a$) If Not(Mid$(a$,m,1)=" " Or Mid$(a$,m,1)=Chr$(9)) Then LTrim$=Mid$(a$,m): Exit Function Next LTrim$="" End Function Function RTrim$(a$) Local Integer n For n=Len(a$) TO 1 Step -1 If Not(Mid$(a$,n,1)=" " Or Mid$(a$,n,1)=Chr$(9)) Then RTrim$=Left$(a$,n): Exit Function Next RTrim$="" End Function
Function RTrim$(aa$) Local Integer n,x local q$ q$=aa$ For n=Peek(Var q$,0) TO 0 Step -1 x=Peek(Var q$, n) If Not(x=&o40 Or x=&o11) Then Poke Var q$, 0, n: Exit For Next RTrim$=q$ End Function