LTRIM$ Function ---------------------------------------------------------------------------- Action Returns a copy of a string with leading spaces removed. Syntax LTRIM$( stringexpression$) Remarks The stringexpression$ can be any string expression. The LTRIM$ function works with both fixed- and variable-length string variables. See Also RTRIM$ Example The following example copies a file to a new file, removing all leading and trailing spaces. ' Get the filenames. INPUT "Enter input filename.", InFile$ INPUT "Enter output filename.", OutFile$ OPEN InFile$ FOR INPUT AS #1 OPEN OutFile$ FOR OUTPUT AS #2 ' Read, trim, and write each line. DO WHILE NOT EOF(1) LINE INPUT #1, LineIn$ ' Remove leading and trailing blanks. LineIn$ = LTRIM$(RTRIM$(LineIn$)) PRINT #2, LineIn$ LOOP CLOSE #1, #2 END