Pad text
Fill a text up to a length with a character on the left or the right, e.g. 42 to 00042; longer text is left as it is.
Command in the String toolkit · id ooa.string/pad · 4 inputs (2 required), 1 output
Inputs
| Input | Type | Required | Default | What it is |
|---|---|---|---|---|
| Text | String | Yes | Source text; a number is used as it is written, e.g. 42. | |
| Length | Number | Yes | Length the result should have, in characters. | |
| Character | String | No | | One character to fill with; a space when empty. |
| Side | String | No | left | left puts the fill before the text (numbers, codes); right puts it after (fixed-width columns). |
Outputs
| Output | Type | What it is |
|---|---|---|
| result | String | The padded text. |