#Include "window9.bi"
Function RtrimA(ByVal dest As String, ByVal trimString As String) As String Export
	Dim As Integer LenS=Len(dest),LenT=Len(trimString)-1,pos_=LenS-1
	For b As Integer=LenT To 0 Step -1
		If dest[pos_]=trimString[b] Then
			pos_-=1
			b=LenT+1
			If pos_=0 Then
				Exit For
			EndIf
		EndIf
	Next
	Return Mid(dest,1,pos_+1)
End Function


