Function PadC() | PadL() | PadR() Foundation
Pads a character string, date or numeric value with fill characters
PadL( <Expression>, <nLen>, [<cFillChr>] ) --> cString
PadC( <Expression>, <nLen>, [<cFillChr>] ) --> cString
PadR( <Expression>, <nLen>, [<cFillChr>] ) --> cString
The return value of the functions PadC(), PadL() and PadR() is a character string with the length <nLen>. It contains the value of <Expression> as a string extended using the fill character <cFillChr> on the left, right or at both ends of the string.
The character functions PadC(), PadL() and PadR() are used for the formatted output of character, date or numeric values. The values are converted to a string which is extended using fill characters to the specified length. PadC() inserts fill character at both ends of the value of <Expression>, so that the value is centered in the character string. PadL() attaches the fill character to the left side of the character string and the value appears right justified. PadR() attaches the fill character at the right and the value appears left justified.
The character string returned has the length <nLen>. When the passed value of <Expression> results in a character string longer than <nLen>, characters are deleted.
The counterpart of the functions PadC(), PadL() and PadR() are the functions Alltrim(), LTrim() and RTrim() which delete leading and/or trailing blank spaces.
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.