Skip to content

Instantly share code, notes, and snippets.

@KevinMarquette
Created April 25, 2017 08:31
Show Gist options
  • Save KevinMarquette/4017b44e04f2b24b064919e6d31cb777 to your computer and use it in GitHub Desktop.
Save KevinMarquette/4017b44e04f2b24b064919e6d31cb777 to your computer and use it in GitHub Desktop.
function Get-AllCaps
{
param(
[char[]]$InputObject
)
If($InputObject.count -eq 1)
{
Write-Output $InputObject[0].ToString().ToUpper()
Write-Output $InputObject[0].ToString().ToLower()
}
else
{
$cases = Get-AllCaps $InputObject[1..$InputObject.Count]
foreach($char in ( Get-AllCaps $InputObject[0] ) )
{
foreach($line in $cases)
{
Write-Output ($char + $line)
}
}
}
}
Get-AllCaps exe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment