PADL( ) | PADR( ) | PADC( ) Functions

Example   See Also

Returns a string from an expression, padded with spaces or characters to a specified length on the left or right sides, or both.

Syntax

PADL(eExpression, nResultSize [, cPadCharacter])

-or-

PADR(eExpression, nResultSize [, cPadCharacter])

-or-

PADC(eExpression, nResultSize [, cPadCharacter])

Returns

Character

Arguments

eExpression

Specifies the expression to be padded. This expression can be any expression type except a logical or currency expression or a general or picture field.

nResultSize

Specifies the total number of characters in the expression after it is padded.

cPadCharacter

Specifies the value to use for padding. This value is repeated as necessary to pad the expression to the specified number of characters.

If you omit cPadCharacter, spaces (ASCII character 32) are used for padding.

Remarks

PADL( ) inserts padding on the left, PADR( ) inserts padding on the right, and PADC( ) inserts padding on both sides.