Search notes:

Powershell script: rot13.ps1

#
#    http://eddiejackson.net/wp/?p=319
#
#    V1
#

# set-strictMode -version latest

[cmdletBinding()]
param (
   [parameter(valueFromPipeline = $true, mandatory = $true)]
   [string] $text
)

process {
   [string] $r = ''

   foreach ($c in $text.ToCharArray()) {

       [int   ] $n = $c

       if     ( ( $n -ge  97  -and  $n -le 109 ) -or ( $n -ge 65 -and $n -le 77 ) ) { $r += [char] ($n + 13) }
       elseif ( ( $n -ge 110  -and  $n -le 122 ) -or ( $n -ge 78 -and $n -le 90 ) ) { $r += [char] ($n - 13) }
       else                                                                         { $r += $c               }

   }

   return $r
}
Github repository scripts-and-utilities, path: /rot13.ps1

See also

Other scripts

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/developm...', 1743215463, '18.116.80.77', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/tools/scripts/personal/rot13_ps1(66): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78