Strings In Depth10 / 16
Up next

PadLeft

$n = "7"
# .PadLeft pads with a fill character
Write-Output $n.PadLeft(4, '0')
What you're solving

pad to a fixed width