Skip to content

Commit 43ae1e8

Browse files
committed
Accepts arrays
1 parent 303ff3f commit 43ae1e8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Get-PaddedCenter.ps1

+2-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
param
1919
(
2020
[Parameter(Mandatory=$false, Position=0)]
21-
[System.String]
21+
[System.String[]]
2222
$Title = 'Start',
2323

2424
[Parameter(Mandatory=$false, Position=1)]
@@ -34,6 +34,7 @@
3434
$Pad = '='
3535
)
3636

37+
[string]$Title = [string]::Join($Separator,$Title)
3738
$PadLengthFull = ($Width - $Title.Length - $Separator.Length*2)
3839
Write-Verbose -Message "PadLengthFull: $PadLengthFull"
3940
$Remainder = 0 ; $PadLength = [system.math]::DivRem($PadLengthFull,2,[ref]$Remainder)

0 commit comments

Comments
 (0)