Trim whitespace from both ends of a string.

SolidGroundUX DocumentationSolidGroundUX
NL

fn: sgnd_trim

Purpose

Trim whitespace from both ends of a string.

Arguments

  • $@ — Words to trim, joined by spaces.

Output

Prints trimmed text without a newline.

Returns

  • 0 after printing.

Usage

  sgnd_trim "  hello world  "