Skip to main content

Text: Pad

Pad a string to a minimum character count by repeating a single fill character. Strings already at or above Length pass through unchanged (no truncation — pair with Text::Truncate if you need both).

Example
Length: 5, Fill: "0", Side: Left
Input: "42" → Output: "00042"

Length: 5, Fill: " ", Side: Right
Input: "hi" → Output: "hi "

Parameters

Length

Minimum character count for the output. Defaults to 0 (input passes through unchanged).

Fill character

Fill character — only the first character of the field is used. Defaults to a single space.

Side

Which side to add fill to:

  • Left — left-pad (fill before the input).
  • Right — right-pad (fill after the input).

Nodes created in the editor start with Left; a configuration that omits the field falls back to Right server-side.

Input

Stringrequired
Text to pad.

Output

String
The padded text.