[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 LTRIM()
 Remove leading spaces from a character string
------------------------------------------------------------------------------
 Syntax

     LTRIM(<cString>) --> cTrimString

 Arguments

     <cString> is the character string to copy without leading spaces.

 Returns

     LTRIM() returns a copy of <cString> with the leading spaces removed.  If
     <cString> is a null string ("") or all spaces, LTRIM() returns a null
     string ("").

 Description

     LTRIM() is a character function that formats character strings with
     leading spaces.  These can be, for example, numbers converted to
     character strings using STR().

     LTRIM() is related to RTRIM(), which removes trailing spaces, and
     ALLTRIM(), which removes both leading and trailing spaces.  The inverse
     of ALLTRIM(), LTRIM(), and RTRIM() are the PADC(), PADR(), and PADL()
     functions which center, right-justify, or left-justify character strings
     by padding them with fill characters.

 Notes

     .  Space characters: The LTRIM() function treats carriage
        returns, line feeds, and tabs as space characters and removes these
        as well.

 Examples

     .  These examples illustrate LTRIM() used with several other
        functions:

        nNumber = 18
        ? STR(nNumber)                  // Result: 18
        ? LEN(STR(nNumber))            // Result: 10

        ? LTRIM(STR(nNumber))         // Result: 18
        ? LEN(LTRIM(STR(nNumber)))      // Result:  2

 Files   Library is CLIPPER.LIB.


See Also: ALLTRIM() PAD() RTRIM() STR() SUBSTR() TRIM()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson