[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 Remove leading and trailing spaces from a character string

     ALLTRIM(<cString>) --> cTrimString


     <cString> is the character expression to be trimmed.


     ALLTRIM() returns a character string with leading and trailing spaces


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


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


     .  This example creates a string with both leading and trailing
        spaces, and then trims them with ALLTRIM():

        cString := SPACE(10) + "string" + SPACE(10)
        ? LEN(cString)                     // Result: 26
        ? LEN(ALLTRIM(cString))            // Result: 6

 Files   Library is EXTEND.LIB.

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