Click or drag to resize

PadL Function (Usual, UInt32, String)

Pad character, numeric, and date values with fill characters on the left.

Namespace:  XSharp.RT
Assembly:  XSharp.RT (in XSharp.RT.dll) Version: 2.4a
Syntax
 FUNCTION PadL(
	uValue AS USUAL,
	nLength AS DWORD,
	cFillChar AS STRING := ""
) AS STRING
View Source

Parameters

uValue
Type: Usual
A character, numeric, or date value to pad with a fill character.
nLength
Type: UInt32
The length of the string to return.
cFillChar (Optional)
Type: String
The character with which to pad <uValue>.
The default is a space character.

Return Value

Type: String
A string containing <uValue> and padded with <cFillChar> to a total length of <nLength>.
If the length of <uValue> exceeds <nLength>, Pad() truncates cPaddedString to <nLength>.
Remarks
PadL is the same as Pad() except that PadL() adds fill characters on the left.
For more information, see Pad(). PadL() is the inverse of LTrim(), which trims leading space from strings.
Examples