Strings In Depth6 / 16
Up next

Trim

$s = "   padded   "
# .Trim removes leading and trailing whitespace
Write-Output "[$($s.Trim())]"
What you're solving

strip surrounding whitespace