Text Processing7 / 14
Up next

Trim and PadLeft

$raw = "  42  "
$clean = $raw.Trim()
# right-align in width 6: "    42"
"[" + $clean.PadLeft(6) + "]"
What you're solving

strip surrounding space, then right-align in a field