I have resolved this way:
Code:
Sub fncALLTRIM(xString)
If StrLength(xString) < 1 Then Return ""
xs = fncLTRIM(xString)
xs = fncRTRIM(xs)
Return xs
End Sub
Sub fncLTRIM(xString)
If StrLength(xString) < 1 Then Return ""
xs = xString
rLTRIM:
If StrLength(xs) > 0 Then
If SubString(xs, 0, 1) = Chr(32) Then
xs = SubString(xs, 1, StrLength(xs) - 1)
Goto rLTRIM
End If
End If
Return xs
End Sub
Sub fncRTRIM(xString)
If StrLength(xString) < 1 Then Return ""
xs = xString
rRTRIM:
If StrLength(xs) > 0 Then
If SubString(xs, StrLength(xs) - 1, 1) = Chr(32) Then
xs = SubString(xs, 0, StrLength(xs) - 1)
Goto rRTRIM
End If
End If
Return xs
End Sub
this is not the best solution but works!
In my projects, exposed in "
Italian Forum", you will find other examples and functions...
Regards.