Overview
Thepad transformation pads a string to a target length by adding a fill character at the start or end.
Syntax
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
variable | string | Yes | The string to pad |
type | string | Yes | Padding direction: "start" or "end" |
expectedLength | number | Yes | The target length of the output string |
fill | string | Yes | The character(s) used to pad the string |