View Single Post
  #5 (permalink)  
Old 08-30-2007, 03:52 PM
specci48's Avatar
specci48 specci48 is offline
Basic4ppc Expert
 
Join Date: Apr 2007
Location: Germany
Posts: 638
Default

Hi maXim,

just as a small hint, there is no need to code the ugly () keyword Goto.
The Do While function in connection with the Exit statement is a much better solution:

Code:
Sub fncLTRIM(xString)
    If StrLength(xString) < 1 Then Return ""
    xs = xString
    Do While StrLength(xs) > 0
        If SubString(xs, 0, 1) = Chr(32) Then
            xs = SubString(xs, 1, StrLength(xs) - 1)
        Else
	    Exit
        End If
    Loop
    Return xs
End Sub

specci48
Reply With Quote