Right-pad styled text using its visible character width.

SolidGroundUX DocumentationSolidGroundUX
NL

fn: sgnd_padded_visible

Purpose

Right-pad styled text using its visible character width.

Arguments

  • $1 — Text, possibly ANSI-colored.
  • $2 — Minimum visible width.

Output

Writes text plus trailing spaces without a newline.

Returns

  • 0 after writing the string.

Usage

  sgnd_padded_visible "$colored_label" 20