home *** CD-ROM | disk | FTP | other *** search
/ Software Du Jour / SoftwareDuJour.iso / BUSINESS / DBASE / CLIPUDF.ARC / LTRIM.PRG < prev    next >
Encoding:
Text File  |  1986-02-04  |  512 b   |  19 lines

  1. *Function....LTRIM()
  2. *Syntax......LTRIM(expC)
  3. *Parameters..Any character expression.
  4. *Returns.....The same string with any leading blanks moved to the
  5. *            end.
  6. *Notes.......Removing the addition of a space in the assignment
  7. *            statement will return a string that is shorter by
  8. *            the number of leading spaces.
  9.  
  10. FUNCTION LTRIM
  11.  
  12. PARAM string
  13.  
  14. DO WHILE SUBSTR(string,1,1) = " " .AND. LEN(string) > 1
  15.    string = SUBSTR(string,2) + " "
  16. ENDDO
  17.  
  18. RETURN(string)
  19.