Wrap a string into lines of a given display width.

SolidGroundUX DocumentationSolidGroundUX
NL

fn: sgnd_wrap_words

Purpose

Wrap a string into lines of a given display width.

Arguments

  • --width N Target width (default 80).
  • --text TEXT Text to wrap.

Output

Writes one or more text lines to stdout.

Returns

  • 0 after printing; 2 on unknown argument.

Usage

  sgnd_wrap_words --width 40 --text "A rather long message to be wrapped"