Left-pad text with a character to a minimum width.

SolidGroundUX DocumentationSolidGroundUX
NL

fn: sgnd_fill_left

Purpose

Left-pad text with a character to a minimum width.

Arguments

  • $1 — Text.
  • $2 — Target width (default 20).
  • $3 — Pad string (default space).

Output

Writes padded text without a newline.

Returns

  • 0 after printing.

Usage

  sgnd_fill_left "42" 5 "0"