Sub Left (str, n)
Return SubString(str,0,n)
End Sub
Sub Right (str,n)
Return SubString(str, StrLength(str)-n,n)
End Sub
Sub Mid (str,x,n)
Return SubString(str,x-1,n)
End Sub
Sub Ltrim (str)
Do
x=x+1
Loop While StrAt(str,x)=" "
Return SubString(str,x, StrLength(str)-x)
End Sub
Sub Rtrim (str)
x=StrLength(str)
Do
x=x-1
Loop While StrAt(str,x)=" "
Return SubString(str,0, x+1)
End Sub
Sub Len (str)
Return StrLength(str)
End Sub
Sub Reverse (str)
x=StrLength(str)+1
Do
newstr=newstr & SubString(str,x-1,1)
x=x-1
Loop While x > 0
Return newstr
End Sub