PadC Function (Usual, Int32, String)
Pad character, numeric, and date values with fill characters on both the right and left.
XSharp.RT (in XSharp.RT.dll) Version: 2.4a
Syntax View Source
uValue AS USUAL,
nLength AS LONG,
cFillChar AS STRING := ""
) AS STRING
public static string PadC(
string cFillChar = ""
- Type: Usual
A character, numeric, or date value to pad with a fill character.
- Type: Int32
The length of the string to return.
- cFillChar (Optional)
- Type: String
The character with which to pad <uValue>.
The default is a space character.
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>.
PadC is the same as Pad() except that PadC() centers <uValue> within <nLength> and adds fill characters on both the left and right sides.
For more information, see Pad().
PadC() is the inverse of AllTrim(), which trims both leading and trailing space from strings.
Examples See Also