function ConvertFrom-Rot13{[CmdletBinding()]param([Parameter(Mandatory = $true,ValueFromPipeline = $true)][String]$rot13string)[String] $string = $null;$rot13string.ToCharArray() |ForEach-Object{Write-Verbose"$($_): $([int] $_)"if((([int] $_ -ge 97) -and ([int] $_ -le 109)) -or (([int] $_ -ge 65) -and ([int] $_ -le 77))){$string += [char] ([int] $_ + 13);}elseif((([int] $_ -ge 110) -and ([int] $_ -le 122)) -or (([int] $_ -ge 78) -and ([int] $_ -le 90))){$string += [char] ([int] $_ - 13);}else{$string += $_}}$string}
PowerShell v2 Function ConvertFrom Rot13
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment