ALLTRIM()

Advantage Concepts

Advantage Expression Engine function that removes leading and trailing spaces from a character string

Syntax

ALLTRIM(<cString>) à cTrimString

Parameters

<cString>  The character expression to be trimmed.

Return Values

Returns a character string with leading and trailing spaces removed.

Remarks

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.

Note Do not use ALLTRIM, LTRIM, RTRIM, or TRIM to create a variable length index key. If you use a TRIM function, also use a PAD function to make the key length a fixed length. For example: PADR(ALLTRIM(charfield),10).

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

Note Advantage Expression Engine functions can be used in expressions such as record filter expressions and index expressions. They are not necessarily scalars supported within SQL statements. For a list of supported SQL scalar functions, see Supported Scalar Functions.

Note Memo, binary, and image fields are not supported in this Advantage Expression Engine function. If memo, binary, or image fields are used with this expression engine function, the Advantage Expression Engine will be unable to evaluate the expression.

See Also

LTRIM()

PAD()

RTRIM()

TRIM()