C5_LTRIM

 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()

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.