Created
April 25, 2017 08:31
-
-
Save KevinMarquette/4017b44e04f2b24b064919e6d31cb777 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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